Los Angeles , California ( CNN ) -- A man wearing a hooded sweatshirt shot two men at a North Hollywood synagogue on Thursday morning , wounding them in their legs , police said . The two men , who have not been identified , are in stable condition at separate hospitals , said Deputy Chief Michel Moore of the Los Angeles Police Department . Authorities took a juvenile into custody whose clothing matches `` a loose description '' of what the suspect was wearing , police said . He was released later Thursday pending further investigation . Police said he was cooperative with authorities . `` We have eliminated no one and that includes the teenager who was detained , '' said Lt. Alan Hamilton . `` He was basically released to school because he is a juvenile and can not be detained for more than six hours . But we are not actively investigating him as a suspect in this shooting case at this time . '' Police have put extra patrols near local schools and other synagogues as a precaution , he said . `` We are looking into every possible motive , '' Los Angeles Mayor Antonio Ramon Villaraigosa said . `` But at this point , all we know is that it was a random act of violence . '' The shooting occurred about 6:20 a.m. at Adat Yeshurun Valley Sephardic Synagogue , police said . Moore said the two victims , ages 38 and 53 , arrived at the synagogue 's parking garage in separate vehicles . As they were parking , he said , a man in a black sweatshirt approached , pulled out a handgun and fired on the first victim . The shooter then fired on the second victim and fled , Moore said . `` We do n't know whether this was a robbery or whether it was an attack on these two individuals because of their presence at this synagogue , '' Moore said . He said he believed that the two victims were arriving at the synagogue for morning prayers . Authorities are reviewing security video from the synagogue , he said . Authorities had interviewed the victims , said Jorge Villegas , assistant commander for the Los Angeles Police Department .
NEW : Juvenile taken into custody and released pending investigation , police say . Los Angeles mayor calls crime `` a random act of violence , '' says police investigating motive . 2 men in stable condition after being shot in the legs , police say ; identities not released . Both wounded at North Hollywood 's Adat Yeshurun Valley Sephardic Synagogue .