Authorities initially put Jewish schools and temples on alert before saying the attack appeared to be isolated.
Police detained a 17-year-old high school student near the temple because he matched a "very loose" description of the attacker, who was described as a black man wearing a hoodie, Deputy Police Chief Michel Moore said. They later released the youth, saying while he was still a potential suspect, they didn't have enough evidence to hold him.
Two men, ages 38 and 53, were shot in the legs near the Adat Yeshurun Valley Sephardic Orthodox synagogue in the San Fernando Valley, Moore said. The men, both members of the synagogue, arrived in separate cars for the morning service shortly before 6:30 a.m. and were in a stairwell leading up to the synagogue sanctuary when the gunman shot them several times, police said.
The victims, who were hospitalized in good condition, told police the attacker did not speak, Moore said.
One worshipper, Yehuda Oz, said he and about 14 others were praying in the temple when they heard four gunshots and screams from the parking area. Two men stumbled into the temple, Oz said, and people rushed to stop their bleeding.
No one saw the attacker, he said.
"Maybe it was crazy person," Yehuda told the Los Angeles Times. "Maybe he was drugged up. Maybe it was a Jew. We don't know."
Even as investigators tried to find a motive, Mayor Antonio Villaraigosa and other officials moved to calm fears that the attack was part of any organized anti-Semitic violence.
"We certainly recognize the location and we're sensitive to that," Moore said. "But we do not know that this was a hate crime at all."
Police searched the area for several hours but found no one. An alert that sent extra police patrols to local Jewish schools and synagogues was called off.
Security camera footage from the synagogue shows the suspect but not the shooting, and the quality is too poor for investigators to identify the man, Cmdr. Jorge Villegas said.
The attack occurred 10 miles from a 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, and is serving a life sentence without chance of parole.
The synagogue is in an area of long boulevards with commercial districts, tree-studded blocks of post-World War II stucco homes and apartment complexes on the north side of the Hollywood Hills. It has the second-largest concentration of Jews in the city, said Rabbi Abraham Cooper of the Simon Wiesenthal Center, a Jewish rights group with more than 400,000 members in the United States.
About 6,000 Jews live within walking distance of the synagogue, among many more thousands who live in the San Fernando Valley, Cooper said.
"Adat Yeshurun is a Sephardic synagogue, which means it would attract primarily Jews from Morocco, Yemen, Israelis, some Persians," Cooper said.
It would be easy to scope out synagogue members because they show up every morning at the same time, Cooper said. The synagogue is not on a busy thoroughfare, and Cooper said he believed the gunman may have gone out of his way to attack the men.
"It's a bit of an anomaly about what was that guy doing there, and if he targeted, why there?" Cooper said.
LAPD First Assistant Chief Jim McDonnell said investigators were trying to determine whether a similar suspect might have been involved in robberies or other crimes in the area.
Shayan Yaghoubi, 13, was walking with his mother to the synagogue's adjoining school but wasn't allowed to cross the police line.
"The cops told us we can't go," he said. "I feel very bad because this is my favorite school ... I have a lot of friends over there. I hope everyone is OK. There's never been a problem with fighting."
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."
But Sholomo Yaghobi, 18, said the neighborhood was "calm, relatively."
His brother attends the temple's school and was worried. "I'm upset if something would have happened to my brother, who would answer to that?" he said.
Associated Press Writer John Antczak in Los Angeles contributed to this report.