Four South Jersey residents plotted to rob an acquaintance Tuesday night, but it all went wrong when one of the suspected bandits shot himself, authorities said.

Police responded to a parking garage on Cooper Street in Woodbury shortly after 8:30 p.m. for a report of a shooting.

Officers learned that one of the robbers allegedly struck the 20-year-old victim on the head with a gun. The weapon discharged, striking the assailant in the hand, police said.

The four fled the scene as police arrived, but were quickly apprehended following a motor vehicle stop not far from the scene. The gun allegedly used in the assault was found in the car.

The robbery victim and the robber were taken to hospitals for treatment of non-life threatening injuries, police said.

Branden Wentz, 19, of Logan Township, was charged with robbery, aggravated assault, terroristic threats and weapons offenses.

Doug Henderson, 24, of Camden, was charged with conspiracy to commit robbery and hindering apprehension.

Brianna Jimenez, 18, of Logan Township, and Aleem Clark Jr., 18, of Camden, were charged with conspiracy to commit robbery.

Wentz and Henderson were placed in Salem County Correctional Facility, while Jimenez and Clark were released pending court hearings.

The incident remains under investigation. Anyone with information is asked to contact Detective Jamie Morris at 856-845-0065, ext. 138 or jmorris@woodburypd.com.

Deptford and Westville police assisted in the arrests.

Matt Gray may be reached at mgray@njadvancemedia.com. Follow him on Twitter @MattGraySJT. Find the South Jersey Times on Facebook. Have a tip? Tell us: nj.com/tips.