DUQUESNE, Pa. (AP) — A western Pennsylvania police officer and a suspect were both taken to hospitals after being wounded in an exchange of gunfire, authorities said.

Allegheny County police say the Duquesne officer responded to a report of gunshots shortly before 12:30 a.m. Wednesday and “was immediately met by gunfire before exiting his vehicle.”

Police said the officer was wounded in the foot in the ensuing exchange of fire and the suspect was hit in the leg. Police said the suspect went into the basement of a vacant home and was taken into custody by other officers.

The officer and suspect were both taken to hospitals in stable condition.

Police said the 28-year-old suspect is hospitalized under police guard and will face charges including attempted homicide and aggravated assault on a law enforcement officer.