A California gun safety instructor accidentally shot a pastor taking his class after swapping out a rubber dummy for a firearm loaded with live ammunition.

Tom Smith, pastor at The House Modesto, was shot and wounded in the hip Dec. 5 at the Personal Protection Institute, reported The Modesto Bee.

Police said instructor Phillip Rushing had been using the rubber dummy, which doesn’t have a firing mechanism, but removed the prop gun and replaced it with his real handgun as class was ending.

ADVERTISEMENT

But a student asked Rushing to demonstrate what he would do if he was attacked by someone with a knife, and the pastor volunteered to play the assailant in the scenario.

Rushing drew his gun and fired at Smith during the role-playing exercise and immediately called 911 after accidentally shooting the pastor.

Police said they weren’t sure whether the instructor forgot he had replaced the prop gun with a loaded firearm.

Smith suffered a gunshot wound to his waist, just above the hip, and underwent surgery.

His church issued a statement on Facebook that said Smith was still in “much pain pulling through the physical therapy.”

ADVERTISEMENT

Rushing’s online biography claims 43 years of martial arts study, including 33 years as an instructor, and he also teaches “combative encounters” including firearms and knife training.

Another firearms safety instructor said he felt bad for both Smith and the instructor who shot him, but he said a live weapon should never have been in the classroom.

However, he said those types of accidents are bound to happen.

ADVERTISEMENT

“If you’re a firearms instructor long enough, you’re going to see accidents happen,” said Dan Gray, owner of and firearms instructor at Trident Firearms Academy.

Watch this video report posted online by KOVR-TV: