LINCOLN CITY, Ore. (AP) — Police say an Oregon man is recovering after he accidentally shot himself while flaunting a handgun at a Lincoln City supermarket.

The Oregonian/OregonLive reports the mishap happened Sunday night when Nicholas J. Ellingford brandished his Glock 9mm in the checkout line at McKay’s Market on U.S. 101 and tried to show it off to a friend according to the Lincoln City Police Department.

Police say Ellingford mistakenly pulled the trigger as he stuffed the weapon back into his pants. Police say a bullet tore through his groin and exited his thigh, just missing the man’s femoral artery.

Ellingford was flown to a Portland hospital. He did not have a concealed handgun license and could face criminal charges for his reckless behavior, according to police.

No one else was injured.