Police have arrested and charged the teen who stabbed four fellow students in front of their Manhattan school.

Juan Gomez, 16, turned himself in to police at the Midtown North Precinct around 8 p.m. Wednesday and was charged with attempted murder and multiple counts of assault and weapons possession, officials said.

The fight broke out in front of PS35 on West 52nd Street near 8th Avenue in Hell’s Kitchen around 1:20 pm. Wednesday and continued down the block and around the corner.

Gomez pulled out the knife and stabbed a 15-year-old by in the back and stomach. He also slashed three other students ranging between 17 and 18 years of age.

Police said all of the boys were students at PS 35.

All of the injured students were taken to local hospitals with non-life-threatening injuries.

Police officials said the fight stemmed from an ongoing school beef.