A police officer who worked for a decade in west suburban Riverside was shot Monday in Colorado.

Colorado Springs Detective Marcus Yanez was shot Monday afternoon when he and other members of an auto theft task force attempted to a take a suspect into custody, according to the Colorado Springs Police Department.

When confronted by officers, 19-year-old Manuel Zetina drew a semi-automatic handgun and fired at them, police said. Yanez and two other detectives were wounded and El Paso County Sheriff’s Detective Micah Flick was killed.

Officers fatally shot Zetinas, police said.

Prior to taking the job in Colorado Springs in 2007, Yanez worked for the Riverside Police Department for 10 years, according to Riverside Police Chief Tom Weitzel.

Yanez was hired by Riverside as a patrolman in 1997 and rose to the rank of officer-in-charge before accepting the offer from Colorado Springs.

“He just really loved Colorado Springs,” Weitzel said. “We’re a small department; I think he was looking for some new opportunities.”

During his time in Riverside, Yanez earned several merit awards for his police work, Weitzel said.

“We’ve reached out to [Colorado Springs police] to offer any assistance we can,” Weitzel said.

Yanez has been released from the hospital to continue his recovery at home, Colorado Springs police said.