Updated 12/13/13 – 10:49 a.m.

ARLINGTON HEIGHTS, Ill. (CBS) – SWAT team officers shot and killed a gunman who allegedly shot an Arlington Heights police officer late Thursday, after the suspect barricaded himself in a home and held a woman hostage.

CBS 2’s Susanna Song reports Officer Michael McEvoy has an Arlington Heights firefighter to thank for likely saving his life after he was shot while responding to a domestic dispute.

McEvoy, a 23-year-veteran, was the first officer to respond to a call of a man with a gun in the 1900 block of Windham Court, around 7 p.m. Thursday. He was shot while going into the home, according to Arlington Heights Police Cmdr. Andrew Whowell.

McEvoy was shot in the neck. Other officers that were with him were able to get him out of the house, and to safety. Arlington Heights Deputy Fire Chief Ken Koeppen was visiting a neighbor at the time, and administered first aid before McEvoy was taken to the hospital.

Whowell said it was divine intervention that Koeppen happened to be visiting a relative nearby, and may have saved McEvoy’s life by treating him at the scene.

The alleged gunman, later identified as 41-year-old Eric Anderson of Niles, barricaded himself inside the home after shooting McEvoy, and took a woman hostage, as other police officers surrounded the house.

Police said Anderson had showed up at the house looking for his 39-year-old estranged girlfriend, who was visiting her mother. She had an order of protection against him, so when he showed up with a gun, she called police.

Eric Anderson (driver's license photo provided by Arlington Heights Police)

Eric Anderson (driver’s license photo provided by Arlington Heights Police)

Anderson shot McEvoy in the face when he arrived, then took his estranged girlfriend hostage.

“After approximately two hours, Anderson exited the interior of the home into an attached garage, at which time he confronted the police, pointed a firearm at officers, at which time members of the Emergency Services Team fired shots, striking him multiple times,” Whowell said.

McEvoy was taken to Advocate Lutheran General Hospital in Park Ridge, where he underwent surgery. He was listed in stable condition Friday morning.

Anderson was taken to Northwest Community Hospital in Arlington Heights, where he was pronounced dead at 11:02 p.m., according to the Cook County Medical Examiner’s office.

The woman who was taken hostage was not injured, but was taken to the hospital as a precaution.

Police said they had encountered Anderson before, as he had been arrested several times for weapon offenses.

Watch & Listen LIVE