A 19-year-old faces attempted murder charges in the close-range shooting of a rookie Camden County police officer Wednesday night.

Delronn Mahan, of Lindenwold, was charged Thursday with attempted murder, aggravated assault and related offenses, Camden County Prosecutor Mary Eva Colalillo said.

Mahan is accused of shooting 21-year-old officer Patrick O'Hanlon shortly after 10 p.m. Wednesday around 8th Street and Chelton Avenue in Camden.

The first-year officer approached three men he believed were suspicious, investigators said. The area is known for gang and drug activity, Camden County Police Chief Scott Thomson said.

As O'Hanlon walked toward them, one of the men began to flee. After O'Hanlon caught up to him, the man allegedly pulled out a gun and the two men began to struggle over the weapon. Mahan then opened fire at close range, shooting O'Hanlon in the leg, police said.

"It appears that the suspect tried to shoot the officer a second time in the face, but the gun did not go off," Thomson said the gun jammed, likely saving Officer O'Hanlon's life.

Responding officers took the suspect into custody and tended to the wounded officer.

"The officers who immediately responded to the scene immediately applied a tourniquet to the wounded officer's leg," Thomson said.

O'Hanlon, who is also an Army reservist, was taken to Cooper University Hospital where he was listed in stable condition with non-life-threatening injuries. Thomson said the bullet went through O'Hanlon's upper right thigh. He praised the officers who rushed O'Hanlon to the hospital.

"They saved the life of their brother officer and got him to the hospital and he's gonna be fine," Thomson said.

The officer remained in a lot of pain Thursday, his parents at his side, Thomson said. O'Hanlon was able to give a thumbs up from his hospital as seen in a tweet from police.

NBC10/ Camden Police

Mahan was not injured during the incident. Police say O'Hanlon never opened fire during the struggle.

"I'm extremely proud of the officer," Thomson said. "I'm extremely proud of the fellow officers that responded, minimized the situation without injury to even the suspect in that matter. That's asking a lot of people to do."

Mahan was jailed ahead of a bail hearing, prosecutors said.

"We know that a really bad guy had a gun on him and he was gonna do some bad things with it out there on the street," Thomson said outside Cooper University Hospital late Wednesday night. "If not for our officer intercepting him and taking him off the street and the gun there probably would have been a lot worse events taking place tonight."

Police continued to investigate the incident Thursday.