WESLEY CHAPEL, Fla. — A school resource deputy for the Pasco County Sheriff's Office lost his job on Wednesday after he accidentally fired his gun in a school cafeteria in April.

Pasco Sheriff Chris Nocco announced the termination in a press conference on Wednesday. He said the deputy was fired for "conduct unbecoming" and mishandling his weapon.

PREVIOUS COVERAGE: School Resource Officer's gun accidentally fires in cafeteria of Wesley Chapel middle school

Nocco says the SRO was in the cafeteria, leaning against the wall when his holstered, duty-issued firearm accidentally discharged into the wall behind him. There were 10 kids in the cafeteria at the time, Nocco said.

According to Nocco, the deputy can be seen on video lifting the weapon in and out of its holster. Nocco says while its still unknown what exactly caused the weapon to go off, he said the deputy's "actions are what caused it."

"Ultimately it comes down to, if you leave the gun in the holster it's not going to go off," Nocco said. "Only one thing caused that gun to go off — it was him," he later added.

Nocco said the Florda Department of Law Enforcement did independent tests on the weapon and found that nothing was wrong with it.

"There was nothing wrong with the weapon, from the Pasco Sheriff's standpoint to an independent study by the Florida Department of Law Enforcement. There was nothing wrong with the handgun."

According to Nocco, the deputy admitted that he has a bad habit of fidgeting with his gun.

"Our members are trained on our weapons, on proper handling. The actions the former member displayed are nothing that we train," Nocco said. "Every time you use that weapon, you have to remember it is a deadly weapon."

Nocco said from the day of the incident until Wednesday, the deputy was on administrative leave.