A man wielding a shotgun held up a 7-Eleven store in San Diego Friday morning, but almost didn’t get away because he apparently locked his keys inside his car.

Authorities said the gunman entered the 7-Eleven convenience store in the 4100 block of University Avenue shortly after 4:30 a.m.

The gunman demanded money from the clerk and left with an undisclosed amount of money, 10News reported.

In the parking lot, the suspect apparently noticed he left his car keys inside his getaway vehicle and was forced to smash in his window to unlock the car.

Police told the San Diego Tribune detectives believe the suspect also stole cash and pornographic magazines from an adult book store about 24 hours before.

He was described as about 6 feet tall and in his 20s with long hair.

Police said they are looking for a dark, four-door Nissan Sentra with a broken driver’s side window.