An undercover Chicago police officer was shot in the city's West Garfield Park neighborhood on Wednesday, but before he was taken to a hospital he helped to apprehend a suspect in the shooting after a brief pursuit.

"There is no question that the officer's work today in recognizing the danger the community was in from the offender that was fleeing the scene saved lives, and we owe the officer and the rest of the team a debt of gratitude," Mayor Lori Lightfoot said.

An undercover Chicago police officer was shot in the city's West Garfield Park neighborhood on Wednesday, but before he was taken to a hospital he helped to apprehend a suspect in the shooting after a brief pursuit. NBC 5's Natalie Martinez has the latest details.

According to CPD Interim Superintendent Charlie Beck, the officer was shot in the wrist after engaging with an armed suspect who had just fatally shot another individual in the 4000 block of West Madison.

The officer was in an undercover vehicle at the time of the shooting and began to follow the suspect's pickup truck. When the suspect realized he was being followed near the intersection of Madison and Karlov, he stopped the truck, got out of the vehicle and fired multiple rounds, striking the officer in the wrist, according to Beck.

The offender then fled the scene in the truck, and another Chicago police officer began to transport the wounded officer to Stroger Hospital. While en route, the injured officer spotted the truck of the man who had shot him, and was asked by the transporting officer if he wanted to continue to the hospital or to pursue the suspect.

An undercover Chicago police officer was shot in the city's West Garfield Park neighborhood on Wednesday, but before he was taken to a hospital he helped to apprehend a suspect in the shooting after a brief pursuit. NBC 5's Natalie Martinez reports.

According to Beck, the injured officer gave the go ahead to go after the suspect.

"While en route to the hospital, the officer and the transporting unit observed the offender in the pickup truck," Beck said. "The officer who was driving the vehicle asked the injured officer - who at this point had been shot - if he wanted to go to the hospital or apprehend the offender. He said to apprehend the offender."

Chicago Police Interim Superintendent Charlie Beck describes the moments after an officer was shot, then helped to apprehend the suspect.

The suspect eventually crashed his vehicle into a stationary object and fled the scene on foot, but was quickly apprehended by police.

"The officer is resting," Beck said. "His family is at his side, and we expect a recovery."

Dr. Leah Tatebe at Stroger said the officer is expected to be released within 24 hours.

Keep this page open for the latest breaking details.