boonsom/iStock(WESLEY CHAPEL, Fla.) — A Florida school resource officer was terminated for accidentally discharging his weapon while fidgeting with it in a school cafeteria.

Jonathan Cross, an officer at Thomas E. Weightman Middle School in Pasco County, was fired on Wednesday, concluding a months-long investigation that began earlier this year when his service pistol accidentally discharged just a few feet away from students, police said.

Investigators concluded that Cross had been moving the gun up and down in its holster, which caused the weapon to fire on April 30.

Cross, 45, admitted that he had a terrible habit of fidgeting with his weapon, Pasco Sheriff Chris Nocco said Wednesday.

There were about 10 students in the cafeteria at the time. At least one student claimed to have seen Cross fidgeting with his gun in the past.

“His actions with his weapon caused it to fire,” Nocco said. “I just want to thank God that no one’s kids in that lunch room were hurt. … It’s sad what we have to do today. It would have been tragic if a child was harmed.”

Nocco said surveillance footage showed Cross leaning on a wall and lifting the pistol up and down, but it’s unclear if his finger was on the trigger. The bullet hit the wall behind him and no one was hurt.

He said the Florida Department of Law Enforcement conducted an independent test of the weapon and confirmed that it did not malfunction.

“Ultimately, it comes down to, if you leave the gun in the holster, it’s not going to go off,” Nocco said. “Our members are trained on our weapons on proper handling. The actions the former member displayed are nothing that we train.”

“We train for the opposite, that every time you use that weapon, you have to remember it is a deadly weapon,” he added.

He said the officer was terminated for “conduct unbecoming and use and mishandling of a weapon.” The officer had been placed on administrative leave pending investigation.

The sheriff’s office presented the case to the State Attorney’s Office, which decided against criminal charges.

Copyright © 2019, ABC Audio. All rights reserved.