An officer with the Salem (OR) Police Department shot on Tuesday night has been treated and released from a nearby hospital. The suspected gunman eluded police for nearly 12 hours but was eventually apprehended and arrested.

Related: Tourniquet, Ballistic Vest Save Life of Oregon Officer After Being Shot

According to KGW-TV, the incident began with a traffic stop during which the suspect suddenly fled and fired shots at the female officer—whose name has not yet been released.

The suspect was found to be at an apartment complex, where SWAT teams eventually breached the door to the dwelling in which the man was barricaded. He was taken into custody 12 hours after the incident.