Police arrested a principal at his Manhattan high school yesterday after he wrestled with security guards in an attempt to stop them from embarrassing a student by marching her out of the building in handcuffs, cops said.

Mark Federman, 37, stood in the front doorway of East Side Community HS on East 12th Street at about 8 a.m. Police said he blocked the officers from hauling away a 17-year-old girl who was charged with punching one of the guards in the eye.

A fierce argument ensued. Federman, a well-liked, 13-year veteran of the school, demanded the guards take the girl out via a secluded back door, cops said.

He feared the teen would be humiliated by being paraded in shackles before the student body, which was beginning to assemble outside for the start of class, sources said.

But the guards insisted that the girl, Isamar Gonzales of East 10th Street, be taken out the front. The argument soon became physical. The pugnacious pedagogue and one of the guards started struggling, and fell to the ground.

After the dust settled, Federman was charged with resisting arrest and obstructing governmental administration. The guard was treated at a hospital for an arm injury.

Federman declined to comment after he was given a desk appearance ticket at the Ninth Precinct and released yesterday morning.

He has not been suspended and was back at his post running the school immediately after his release.

Federman, a former teacher and basketball coach, is in his seventh year as the head of the school. Students and teachers gave him a 93 percent approval rating on the most recent principal performance survey.

Department of Education spokeswoman Dina Paul Parks said officials are not going to press disciplinary action against him.

“There is some understanding that he was doing what he thought was best,” she said. “Though judgment calls can sometimes be difficult.”

Despite the donnybrook, Gonzales was eventually frog-marched out of the front of the building before the stunned stares of her fellow students. Federman was also taken in cuffs out the front of the building.

The teen was charged with second-degree assault, a felony. The female security officer was hospitalized with an injury to her eye.

After Gonzales was booked at the Ninth Precinct, she was taken to Bellevue Hospital on a stretcher, complaining of head pain.

Gonzales’ family said that the trouble started because she went to school early and the guards told her to get out. They claimed that the guards got too rough and escalated the incident.

“Whoever touched my daughter, they need to come down and pay for it,” said her mom, Luz.

Isamar Gonzales has no criminal record, but her family admitted that she has a history of getting into fights.

Anthony Morales, who is the father of Isamar’s boyfriend, said he was in the school at the time and witnessed the struggle. He said that the guards grabbed her by the hair before she threw the punch.

He also claimed that a representative of the school called her family yesterday and tried to settle the matter quietly.

“They would consider dropping charges if the family won’t press charges,” he said.

jamie.schram@nypost.com