A father accused of threatening to shoot Estancia High School staff when they prevented him from taking his daughter out of class pleaded not guilty Wednesday to four felony charges and one misdemeanor charge.

Michael McHugh, 45, allegedly brandished a BB gun Friday and said he would kill anyone who tried to stop him from taking his child.

He is charged with one felony count each of assault with a deadly weapon, criminal threats, threat of injury to a school official and possession of a weapon on school grounds, according to court documents.

Estancia staff prevented McHugh from taking his daughter because she and the family have an active restraining order against him, school officials said.

The Costa Mesa man also pleaded not guilty to a misdemeanor contempt of court charge for allegedly violating that order.

In November 2010, the court instructed him to stay at least 100 yards away from the protected person, according to the charges.

Friday's confrontation began when an Estancia employee found that McHugh was not authorized to pick up his child.

When an assistant principal asked him to leave, McHugh produced the replica handgun and began threatening administrators, school officials said.

The school went into lockdown and administrators wrestled the gun away from McHugh before police arrived to arrest him, Estancia staff said.

McHugh is in custody in lieu of $100,000 bail and is scheduled to appear in court again Feb. 28, according to jail records.

jeremiah.dobruck2@latimes.com

Twitter: @jeremiahdobruck