Rapid City police say a third person has died after a shooting at an apartment complex.

Eighty-one-year-old Thomas Trout died after suffering a medical issue after he was evacuated during Sunday’s gunfire.

A Rapid City police officer fatally shot the gunman who opened fire on officers after he killed a man in the building.

Officers encountered 29-year-old Patrick Alden of Rapid City, armed with a rifle, in the stairway. Officer Garrett Mastin shot and killed Alden. The victim s identified as 64-year-old David Ironhorse of Rapid City. The South Dakota Division of Criminal Investigation is investigating the officer-involved shooting.