NEW YORK -- A 15-year-old has been taken into custody after allegedly shooting and injuring a tourist in Times Square and firing at a responding officer, law enforcement sources told ABC News.
The teen was caught Friday afternoon just north of New York City, in Yonkers, by the U.S. Marshals, law enforcement sources told ABC News.
The shooting unfolded after three teenage boys -- two aged 15 and another 16 -- entered JD Sports, a clothing and sneaker store, at about 7 p.m. Thursday and started stealing merchandise on the second floor, NYPD Chief of Patrol John Chell said. Two of the three suspects went to the lobby, where a female security guard confronted them and took back the stolen property, Chell said.
WATCH | WABC-TV special report on Midtown shooting
One teen -- a 15-year-old -- then fired a .45-caliber handgun toward the security guard but instead shot a 37-year-old woman visiting New York from Brazil, police said.
The woman, who was shot just above her left knee, hid in a storage room before she was taken to a hospital in stable condition, police said. She's since been treated and released, police sources told ABC News.
The gunman fled a few blocks away where he fired two shots at a pursuing officer, police said.
The officer wasn't hit and didn't return fire because there were too many people nearby, police said.
The suspect then dumped his shoes and jacket and escaped to a subway station where he ran onto the tracks, police said.
He later ran out of the subway and was at large for nearly 24 hours.
"An attack on a cop is an attack on all of us!" NYPD Deputy Commissioner Kaz Daughtry tweeted.
The 16-year-old boy who was with the gunman at the clothing store is in custody and investigators are working to determine his role, police said at a news conference Friday.
The 15-year-old who did not fire the weapon at the store was interviewed by detectives and released, according to police. All three go to school together.
The gunman is also a suspect in a Jan. 27 armed robbery in the Bronx and a "shots fired" incident in Midtown Manhattan, police said. Police said the suspect is from Venezuela and arrived in the U.S. in September.
ABC News' Victoria Arancio contributed to this report.