An intruder at a Bronx elementary school slashed a school safety agent in the neck Thursday morning, officials said.

Mayor Eric Adams, during an unrelated press conference, described how the knife-wielding suspect tried to go after a teacher inside P.S. 69 but the school safety agent was able to fend off the attack, sustaining a knife wound himself.

“The individual will be brought to justice. It is unacceptable,” Adams said. “Violence in our school will not be accepted.”

Police confirmed the stabbing took place at 7:40 a.m. and the school safety agent was wounded in the neck. He was taken to Jacobi Hospital and is in stable condition. A 23-year-old suspect was in custody and charges against him were pending, police said.

The mayor used the attack to highlight his reversal of a decision by former Mayor Bill de Blasio, that would have would have transferred school safety agents away from the NYPD’s purview under the umbrella of the Education Department instead.

The move by the former mayor was part of a slate of efforts to cut the NYPD budget, following the murder of George Floyd by Minneapolis police in 2020. Despite de Blasio’s declarations, the transfer of the agents to DOE never actually materialized.

Advocates have long criticized school safety agents’ ability to issue arrests and summonses to students. Black and Latino public school students are disproportionately targeted and critics say the presence of uniformed agents criminalizes student misbehavior that could be handled internally by schools.

“There was an argument and conversation during the campaign, should we have school safety agents in our school buildings and I would say emphatically yes,” Adams said. “I said it then and I say it now. They provide a vital service.”