A man who walked into a Chicago hospital early Friday claiming he’d been shot during an attempted robbery was actually injured when a gun went off accidentally inside a car, according to police.

The 21-year-old showed up at a hospital about 3:15 a.m. with a gunshot wound to the neck, according to Park Ridge police. His injury did not appear to be life-threatening.

The victim said he and another 21-year-old man were in a vehicle stopped at a traffic light in the 1400 block of West Higgins Road in Park Ridge, police said. A man walked up to the passenger side and demanded money, and that’s when the man realized he’d been shot, he told police.

He said the suspect ran away and the other man drove him to the hospital, police said. The first hospital was not equipped to treat him and he was transferred via ambulance to another hospital. His condition was not disclosed.

Police investigating the incident later said the man fabricated the story.

“Based on forensic evidence and revised statements from those involved, investigators are now working under the premise that gunshot injury was the result of an accidental discharge inside the vehicle and that the initial reports of a robbery are unfounded,” a statement from police said.

The investigation continues, and police did not say which person in the care fired the gun accidentally.