Police say a man suspected of shooting another man accidentally shot himself in the groin while fleeing the scene of the crime.

The Associated Press reports that the 40-year-old man was attempting to commit a robbery at an apartment complex near Portland State University when he ended up shooting the would-be robbery victim. The man ran to a grocery store for help and was later taken to the hospital.

As the alleged gunman fled he scene, he reportedly put the gun in the front of his pants and shot himself in the testicles. He was also taken to the hospital.