Updated

A former New York City police officer walked into a suburban middle school with a handgun Tuesday but was wrestled to the floor by the district superintendent, who wrenched the weapon away and pinned him until police knocked down a door and arrested him, authorities said.

No one was injured at South Orangetown Middle School in Blauvelt, a bedroom community and hamlet of Orangetown about 20 miles north of New York City, authorities said.

The man, identified as Peter Cocker, walked into the school, brushing past a security guard, who saw the gun in Cocker's hand and made an emergency call around 11:45 a.m., police said.

Once inside the school building, Cocker headed to the South Orangetown Central School District's administrative offices, which are located on the campus, and confronted district Superintendent Ken Mitchell, barricading the two of them in an office, police said.

A SWAT team and several police agencies sent units to the 800-student school, which was locked down. Officers tried to negotiate with Cocker, but when they heard the sounds of "violent struggle" they used a shotgun to blast their way through the office door, police said.

Authorities said that Mitchell had talked to the man to calm him down before wrestling him to the floor and taking the gun away.

"He managed to pin him down, and right then the police were there and broke down the door to his office and took the man away," said Orangetown Supervisor Thom Kleiner.

He called Mitchell's actions "an incredible bit of bravery and heroism." He described the superintendent as "not a very tall or aggressive-looking man. He's a slight guy, very unassuming."

Police said Cocker, 37, of Tappan, was arrested on charges of kidnapping, criminal use of a firearm, burglary, coercion and criminal possession of a weapon. The district attorney's office is looking into convening a grand jury in the case.

There was no phone listing for Cocker in Tappan. Police said Cocker, who retired from the New York Police Department in 2004, was the parent of a student in the district.

Orangetown police Chief Kevin Nulty said that a letter from the district regarding swine flu may have played a part in the incident. He didn't elaborate.

Parent Eleanor Klepper said the front door at the middle school is usually unlocked during the day and has a security guard posted there. Anyone entering must sign in.

District spokeswoman B.J. Greco couldn't explain how Cocker got past the security guard, but police commended the man's actions.

"I think the security guard did do the right thing," Nulty said, adding that the school and police followed an emergency plan developed in the wake of the 1999 Columbine High School massacre.

"At no time do we believe a child was in danger," Nulty said.

The school was locked down until about 2:20 p.m. Parents could then pick up their children after signing for them.

Others schools in the district allowed no one in but would let people leave. Officials initially directed South Orangetown Middle School parents to go to the Sons of Italy Lodge, about two blocks from the school.

Klepper and her husband, Chris, were at the lodge before the lockdown was lifted and said they worried about their daughters, in grades 6 and 7, even though they were told immediately that they were safe.

"It's very scary," Eleanor Klepper said. "It's scary not knowing, not hearing from your kids, and it's scary that someone got in like this."

Click here for more on this story from MyFOXNY.com.