A man was stabbed near Erasmus Hall High School in Flatbush, Brooklyn Thursday afternoon, police and Department of Education officials said.

The 19-year-old man, who was not immediately identified, was stabbed in the stomach just after 2:30 p.m., according to cops. He was taken to a hospital in stable condition.

A DOE spokeswoman said the stabbing was not related to the school and did not happen inside the building.

"The NYPD immediately responded to a non-school-related incident that took place near the Erasmus Hall Campus in Brooklyn after dismissal. There were no serious injuries and it is being investigated by the NYPD," spokeswoman Toya Holness said.

Initially, investigators weren't sure if the stabbing happened in the lobby of the building on Flatbush Avenue, between Church and Snyder avenues, or on the street nearby, police said. The victim is not cooperating with police, an NYPD spokesman said, which is hampering the investigation. 

The suspect was still on the loose Thursday afternoon, police said.

The stabbing comes on the same day that a 13-year-old boy was caught with an unloaded gun inside his backpack at a Bronx middle school and just a week after an 18-year-old student fatally stabbed a 15-year-old classmate and injured another during a history class at a Bronx high school.

On Tuesday, the NYPD said the number of weapons seized in city schools has risen 48 percent compared with the same time period in 2016. Police have recovered 328 weapons so far this year, Assistant Chief Brian Conroy said.

With Nicole Brown