New York City police have arrested a teenager for the shooting that killed a 34-year-old Brooklyn mother outside a school, officials said Tuesday.

Andrew Lopez, 18, was arrested after allegedly shooting a gun from the roof at a crowd this past Friday that included parents and children outside a school in the Brownsville section of Brooklyn.

NBCNewYork.com reported that Lopez was arrested after cops received a tip.

The bullet struck Zurana Horton, a pregnant mother of 12, who later died from a gunshot wound to the chest.

Horton was hailed a hero after she grabbed her child and several others, shielding them from the barrage of gunfire.

Lopez told detectives the shooting was in retaliation for a dispute his brother had with someone else, WABC-TV reported.

A 31-year-old woman was hit in an arm and the chest and was hospitalized as a result of the shooting.

An 11-year-old girl, a sixth-grader at the school, was also injured with a graze wound on her cheek.