A man robbing a local store accidentally fired a shot into his groin Tuesday, according to police reports. The shot was fired as the robber was attempting to slide the gun into his waistband.

Derrick Kosch, 25, held up the Village Pantry Store demanding cash and cigarettes, a female clerk reported to police. She was filling up the white bag that Kosch handed her when she heard a shot.

The man, she said, then screamed that he had shot himself. He then grabbed the bag and fled, reported the UPI.

Although the clerk was filling up the bag when the shot was fired, and did not see what had happened, video cameras installed in the store caught the sight of Kosch inserting the gun into his waistband, and of the gun afterwards going off.

Authorities caught Kosch when they received a call reporting a man who was shot, in a nearby house. He was found with a wounded testicle and leg.

The bag filled with money was also found at the house, according to the Indy Channel.

Police said that Kosch was to be arrested and charged with armed robbery on Tuesday, after he is released from surgery.