Follow CBSMIAMI.COM: Facebook | Twitter

MIAMI (CBSMiami) – A search for an armed man who the police described as “irrational” led to the precautionary lockdown of several Hialeah schools.

READ MORE: 'Much More Dire': Coast Guard Ramps Up Search For 38 Missing Boaters Missing For Five Days

Hialeah police said the safety measure was taken as they searched for 32-year-old John Chavez.

A new police report says Chavez was upset that his mother had obtained a restraining order against him and got violent and started waving a knife around.

Police said Chavez, who is depressed, bipolar and schizophrenic, broke her cellphone and eye glasses.

Chavez fled when cops went to his home to serve the restraining order. He was found hiding behind this home nearby.

“We know this house, we’ve come here before,” said Hialeah police Sgt. Carl Zogby. “This morning he had a crisis, he ran from officers holding a kitchen knife. He’s an irrational man, a man who is having an emotional crisis at this time.”

Chavez, who is 6’2″ at 220 pounds with tattoos, is an MMA fighter. Police say he has a history of violence and mental illness.

in fact, Chavez was just in bond court Monday, charged with possession of a firearm by a convicted felon. He was arrested after a woman told police he showed her a firearm and said he was going to “smoke someone.”

“He’s an irrational man going through an emotional crisis. He is very dangerous,” Zogby said.

Chopper4 was over the scene as officers with guns drawn searched the grounds in and around Ben Sheppard Elementary, whose campus houses the Ben Sheppard Professional Learning Community, and the Jose Marti Mast Academy – both are located in the area of W 24th Avenue and W 57th Street.

“I was in PE. I was outside of the school playing basketball. They started yelling at us to go back inside. All my friends started running and we went to the locker room and we just stayed there for the last three hours,” said Alex Diaz.

“I was in science lab, I was huddled up with a bunch of kids that I didn’t know, I was nervous,” said Emma Lopez.

READ MORE: Miami's Overheated Home Prices Continue While Experts Say Red Hot Housing Market Starting To Losing Steam

“I was very nervous and scared for my family, for my mom,” said Diaz. “I knew he was in the area so I called her and told her to lock all the doors.”

Some parents waited anxiously outside the schools for hours for word of what was going on.

“I was very nervous because the police weren’t saying nothing. Just coming in the morning, at 9 o’clock in the morning. Everybody was here, I was very nervous because we don’t know what happened in the school,” said parent Mallory Quintana.

“It’s devastating. There are no words to describe how nervous and upset at the same time,” said Yoima Enriquez.

Police tried to keep the parents calm, telling them their children were safe inside their schools and should stay there.

Just after 10 a.m. police announced that they had completed their search of the area and the lockdown at the Ben Sheppard campus, Jose Marti Mast Academy had been lifted.

The search for Chavez then shifted and a temporary lockdown was placed on West Hialeah Gardens Elementary, Hialeah Gardens Middle School, and Hialeah Gardens High School.

Chavez was found hiding in a backyard at 5611 W 21st Court and taken into custody. All of the remaining lockdowns were lifted.

He has an extensive rap sheet. He’s been arrested more than a half dozen times for burglary and has also been charged before with assault and battery, trespassing, cocaine possession and possession of a weapon by a felon.

He faces possible charges now of burglary and fleeing and eluding.

MORE NEWS: COVID-19 Testing Site Finder

Police are searching for the kitchen knife he fled with.