Updated

A St. Louis police officer was shot Friday while trying to stop a car wanted in connection with a robbery, officials said.

Officers spotted the vehicle around 6 p.m. in the 3700 block of Nebraska Avenue, St. Louis Metropolitan Police Chief John Hayden told reporters outside the hospital where the injured officer was being treated. 

As they attempted to pull the car over, the driver fled and crashed nearby, he said. The suspect got out and opened allegedly fire on the officers. Hayden said the officers returned fire. 

He didn't think the suspect was hit. 

"As muzzle flashes occurred, the officer did feel pain just above his eye," the chief said. 

The department said the officer was possibly injured near the eye from broken glass and took himself to the hospital. The suspect was taken into police custody at the scene and a weapon was recovered.

"When I got here I saw him smiling… so I was very thankful," Hayden said about the injured officer. "The officer was very elated to be doing well."

CLICK HERE TO GET THE FOX NEWS APP 

The shooting came amid proposals to slash the police budget and eliminate nearly 100 vacant officer positions. 

"I would think that that would kind of irrelevant to what we're talking about right now," Hayden said when asked about the plan. "We've been dealing with the same shortages for my whole tenure."

St. Louis had 87 homicides per 100,000 residents in 2020, according to the St. Louis Post-Dispatch, the worst rate in the country.

Fox News' Michael Ruiz contributed to this report.