A Modesto, Calif., pastor is recovering after he was shot by his  instructor during a firearms safety class.

The pastor, Tom Smith, was attending a course offered by the Personal Protection Institute when he was accidentally shot, The Modesto Bee is reporting.

The gun safety instructor, Phillip Rushing, had been using a training gun made of rubber, during the class, but he laid the weapon down as the class ended and holstered his own weapon.

Another student asked Rushing to demonstrate what to do if a person with a knife attacks you. Smith volunteered to play the knife-wielding attacker. As Rushing was demonstrating technique, he pulled his weapon, which was loaded, it discharged, and the bullet hit Smith in the waist.

According to Fox40.com, no charges have been filed. The incident happened on Dec. 5. Smith is said to be "still in much pain but pulling through the physical therapy," according to a post on a Facebook page associated with the pastor's church.