A 17-year-old boy died on Saturday from injuries he sustained falling six stories from a New York City building rooftop as he tried to escape police investigating a report of teenagers smoking marijuana, law enforcement said.

Hakeem Kuta of the Bronx died Saturday morning after being in critical condition for nearly two days, police said.

Kuta fell from a roof ledge as he and a 14-year-old friend attempted to escape police, who repeatedly told the teens to stop and “relax,” a spokesman for the New York City Police Department said.

In a statement, police said four uniformed officers responded to a complaint on Thursday evening about a group of teenagers smoking marijuana in the lobby of a Bronx apartment building, police said.

When the officers arrived, one youth held out his arms to slow police as several young males ran up a staircase to the roof, police said.

Some of the teens ran to the south side of the building and hopped to the rooftop of another building, getting away. Kuta and the 14-year-old ran north, and became trapped between the edge of the building and a 10-foot wall on the next structure, the statement said.

Kuta climbed over a barrier at the edge of the roof and slipped, and his 14-year-old friend attempted to grab him but was unable to hold on, a police spokesman said.

The two pursuing officers were able to grab the 14-year-old as he started to fall, authorities said.

Officers found Kuta in an alleyway and cradled his head and performed chest compressions until paramedics arrived, police said.

The teen did not have an arrest record, the New York Times reported.

In November, New York City Mayor Bill de Blasio, seeking to cut down on the number of arrests for possession of small amounts of marijuana, changed police policy to dictate that those found with 25 grams or less of the drug would be issued a summons and not taken into custody.