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.

READ MORE: 'An Important Time For Us': Chicagoans Celebrate Hispanic Heritage Month

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.

READ MORE: Downtown Chicago Roadblocks Quell Mexican Independence Day Street Celebrations

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.