CHICAGO (CBS) — A Chicago police officer was shot in the Humboldt Park neighborhood while executing a search warrant Saturday night, police confirm.

Police confirmed the officer was shot in the left shoulder and was transported to a hospital.

He is in stable but critical condition, CPD Supt. Eddie Johnson said. A police spokesman said the officer is expected to survive and is being cared for at Stroger Hospital.

The shooting occurred shortly after 7 p.m. while executing a warrant for narcotics and illegal weapons in the 2700 block of West Potomoc, according to Chicago police. A team was a attempting to breach the back door of the home when a woman fired a shot through the door, striking the officer.

“This is another illustration of how dangerous it is for police to serve search warrants,” Johnson said.

Police say a female offender, who was the subject of the search warrant, shot the officer and was taken into custody. A gun was also recovered.

The officer who was shot was working with the 25th District TAC team and has four and half years on the job and served eight years in the Marine Corps, Johnson said.

“He’s in pain, but he’s really in good spirits,” Johnson said. “Talking a lot, just wants the ordeal to be over with.”

Charges are pending, and the investigation is ongoing.