Estancia High School Principal Kirk Bauermeister was in his office a few minutes before 1 p.m. Friday, when a student ran by his office yelling there was a gunman.

Bauermeister sprinted in the opposite direction of the fleeing student toward the attendance office. He saw staff hiding or pulling students toward cover.

"I had no idea what was going on," he said.

A few minutes earlier, Michael McHugh, a 35-year-old Costa Mesa man, had tried to remove his daughter from class, police would later assert.

A staffer realized the student's family had an active restraining order against McHugh and asked Assistant Principal Mike Sciacca to intervene, according to school officials.

Sciacca, a new administrator at Estancia, told the father he wasn't authorized to pick up his daughter and asked him to leave campus.

"At that point, things happened very quickly," Sciacca said.

McHugh was carrying a white trash bag filled with bottles, cans and other garbage, Sciacca said.

He reached inside and pressed the muzzle of a replica handgun against the plastic, showing the bulge of its outline, according to the assistant principal.

McHugh announced that he was taking his daughter no matter what and would kill anyone who tried to stop him, Sciacca said.

It wasn't until police recovered the gun later that Sciacca found out it was a BB gun designed to look like a real weapon.

From about conversation distance, the assistant principal stepped quickly forward and to the side, he said, grabbing McHugh's wrist and trying to wrestle away the gun.

"In all honesty it was self preservation at the moment," Sciacca said.

One of Estancia's three security guards, Xavier Castellano, saw the scuffle begin and took off through the hallways.

Students described him sprinting from room to room, yelling, "It's a gun. It's a gun," warning them to evacuate or dive behind desks.

Meanwhile, Sciacca and McHugh tumbled out of the attendance office into the school hallway moments before Bauermeister ran into the room.

Staff yelled that Sciacca had pushed a gunman through the swinging door, away from staff and students.

"I had no idea what was happening on the other side of that door," Bauermeister said Monday.

He decided to burst through it as violently as he could.

On the other side, he saw Sciacca on top of the man. The 34-year-old assistant principal had pinned McHugh to the ground with the weapon underneath them, Bauermeister said.

The two were struggling with their arms between them and the ground.

"They were fighting for the gun, really," Bauermeister said.

McHugh yelled he had the weapon, and Sciacca said it was in his right hand, the principal said.

Bauermeister placed one knee on McHugh's shoulder and the other against his elbow. Using that as leverage, he pried the pistol out and threw it away, the principal said.

"When we got the gun away from him, it was like he relaxed," Bauermeister said. "It was really done at that point."

They held McHugh for a short time until police arrived and took him into custody. Bauermeister said it felt like just a few moments compared to the seeming eternity of the tussle.

"When we were wrestling with him, I'm sure it wasn't more than five or 10 seconds, but it felt like a really long time," Bauermeister said.

It wasn't until police told them later the gun was a BB gun that the two administrators knew they weren't confronting someone with a deadly weapon.

Even then, the thought that they were possibly risking their lives hadn't entered his mind, Bauermeister said.

"I think we were both kind of numb at that point to tell you the truth," he added.

Charges are pending against McHugh, who is scheduled to appear in court Wednesday, and students have been on their President's Day holiday since the confrontation.

Three days after the incident, Sciacca said he was still surprised by his own reaction.

He said the Newport-Mesa Unified School District's new plan for dealing with intruders may have affected him.

Exactly two weeks before the incident, Bauermeister had briefed Estancia staff on the district's new "run, hide, act" response to threats.

After the Sandy Hook Elementary School shooting in Newtown, Conn., school board members began reevaluating their procedures for armed intruders.

This month, they decided the last resort in those dire situations after running and hiding is to physically confront a threat.

Bauermeister told teachers their job is to rush students away, but he warned them they would see a small group of people running in the opposite direction.

"We know that's our job," Bauermeister said. "It's something any parent would do for their kids, and those are my kids."

Estancia will host a parents meeting to discuss the incident at 7 p.m. Monday in the choir room.

jeremiah.dobruck2@latimes.com

Twitter: @jeremiahdobruck