UPDATED: Dec. 15, 2014 7:15 p.m.

BALTIMORE (WNEW/AP) — A Baltimore police officer is in stable condition after being shot during a traffic stop.

Police say 27-year-old Andrew Groman was shot Sunday night and underwent surgery. He was recuperating Monday at a hospital.

Police Commissioner Anthony Batts says 19-year-old Donte Jones has been charged with attempted murder of a police officer, resisting arrest and other related charges.

Officials say the officer and his partner stopped a silver Cadillac with four men inside in the 2600 block of Gwynns Falls Parkway near Coppin State University for alleged suspicious activity after another officer smelled marijuana coming from the car.

Officer Groman and his partner got the driver out of the car with no issue. However, police say Jones, who was seated in the back of the car, resisted getting out.

Documents show that Groman, after asking Jones multiple times to comply with his request, took out a stun gun and fired in his direction just as Jones pulled out a black revolver and fired, according to court papers.

Jones then ran out of the car and behind a nearby house, where officers were able to place him under arrest. Once in custody, Jones confessed to the shooting, according to court papers.

According to Baltimore Police Deputy Commissioner Jerry Rodriguez, the bullet struck Groman below the area protected by the officer’s bulletproof vest. Rodriguez said Jones is the only suspect who has been charged.

Rodriguez said at the time of the shooting Jones was on parole and probation, and has been arrested three times for gun-related offenses.

The officer had surgery at Sinai Hospital. The officer’s family and friends were at the hospital with him, along with Mayor Stephanie Rawlings-Blake and City Councilman Nick Mosby.

Follow WNEW on Twitter

(TM and Copyright 2014 CBS Radio Inc. and its relevant subsidiaries. CBS RADIO and EYE Logo TM and Copyright 2014 CBS Broadcasting Inc. Used under license. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed. The Associated Press contributed to this report.)