Stockton, Calif., robbery suspect in video footage Jan. 21, 2015
Stockton Police Department

A 21-year-old man reportedly sabotaged his own attempt to rob a gas station in Stockton, Calif., last week by accidentally shooting himself in the leg, KCRA reports.

Donnello Knowles allegedly went on a robbery spree the night of Jan. 21, reportedly participating in three different robberies at a nail salon, a Subway restaurant and a gas station. Knowles suffered the self-inflicted gunshot wound during the last leg—no pun intended—of the heist when his gun went off as he was ordering victims to get on the ground in the gas station, authorities said.

After shooting himself, Knowles ran to a friend’s apartment nearby, Stockton police say.

The friend called police to get emergency care for Knowles. When the police showed up, they found that Knowles fit the description of the suspect in the gas station robbery. Police say they also found that he had money from the gas station robbery on him.

According to KCRA, Knowles had yet to be booked on the robbery and other charges he faces because he was in a hospital being treated for his gunshot wound.

Read more at KCRA.