Los Angeles police say a 17-year-old high school student is no longer a suspect in a shooting that occured outside of a North Hollywood synagogue Thursday.

Police had detained the teenager because he matched a loose description of the gunman who shot two Jewish men in the legs as they went into morning services at the Adat Yeshurun Valley Sephardic Orthodox synagogue.

The youth was in the vicinity of the synagogue and matched the "very loose" description of the attacker, said to be a black man wearing a hoodie, Deputy Police Chief Michel Moore said.

Later in the day, Detective Steve Castro said the student had no connection to the shooting and that police were investigating leads and a motive for the attack.

"We have to assume, because it was a synagogue, it was a service (and) that there was no other apparent motive, we're looking at it as a hate crime," Lt. John Romero said.

The victims, identified as 38-year-old Mori Ben-Nissan and 53-year-old Allen Lasry, are said to be in good condition at local hospitals.

The men, both members of the synagogue, had arrived at the partking lot in separate cars shortly before 6:30 a.m. when the gunman approached one and, without speaking, shot him and the other man, Moore said.

Authorities put extra patrols at Jewish schools and synagogues in Los Angeles in case there were more shootings coming and it wasn't an isolated incident — but by later in the day they decided the gunman had acted alone.

There were no security guards in the parking garage but investigators will look at the synagogue's security videos, Moore said.

The FBI also responded to the scene, and police alerted nearby Jewish schools and temples and put extra patrols in place. There are several synagogues in the area.

"We are being vigilant for any follow-ups that may occur," Moore said.

Michael Bloom, 30, an Orthodox organizer with Hatzolah, a Jewish volunteer medical response team, grew up in the diverse neighborhood. He said there had been instances of Jews being insulted as they walked to the synagogue on the Sabbath.

"This has been going on for years. Everything from "death to Israel" to "dirty Jew,"' he said. "There are gangs in the area. It's not the safest neighborhood."

However, Sholomo Yaghobi, 18, said the neighborhood was "calm, relatively."

His brother attends the synagogue's school and was worried.

"I'm upset if something would have happened to my brother, who would answer to that?" he said.

The attack occurred 10 miles from Jewish community center where white supremacist Buford Furrow wounded three children, a teenager and an adult, in 1999. Furrow later killed a Filipino letter carrier on another street.

Furrow, who is serving a life sentence without chance of parole, told the Daily News of Los Angeles in a letter last month that he had renounced his racist views and regretted the pain he had caused.

The Associated Press contributed to this report.