A man is recovering from a gunshot wound after police say he accidentally shot himself in the crotch.

Police said4 the heating and cooling worker was at a job in Birmingham when he pulled his gun out of his waistband and accidentally pulled the trigger. The bullet went through his private part and lodged in his leg.

He was taking out the gun to leave inside his van.

He underwent surgery to remove the bullet and is expected to recover.

Police said the man did have a permit to carry the gun, but could still face a misdemeanor charge for unlawfully discharging a firearm.