Officers confronted a barrage of gunfire, their vision clouded by a haze, as they responded to a shooting at a Minneapolis apartment building Wednesday that left at least two people dead and injured multiple others, officials said.

Police opened fire on the shooter as they rushed to rescue victims and bring them to safety, Minneapolis Police Interim Chief Bill Peterson said. Three officers were injured, two of them by gunshots.

The 35-year-old shooter was killed in the exchange of gunfire with responding officers, authorities said Thursday.

The mass shooting forced residents to flee the halls and hide in apartments as the chaotic scene unfolded.

What appears to be dozens of officers poured into the apartment building in response to the shooting, video obtained by CNN affiliate WCCO shows. Officers armed with long guns can later be seen keeping watch outside as several people are wheeled out from the building on stretchers. The area was surrounded by police cruisers, armored vehicles and ambulances.