At least 12 people were killed and several injured on Friday in a mass shooting at a government building in the US state of Virginia.

Police said the suspect, a long-term and current Virginia Beach city employee, fired “indiscriminately” in a public utilities building.

The gunman, whose identity was not released, was killed in an exchange of gunfire with police.

Officials said an officer was wounded when a bullet struck his vest.

How did the shooting unfold?

The attack began shortly after 16:00 (20:00 GMT), at Virginia Beach Municipal Center, in an area which is home to a number of city government buildings. The area was put into lockdown by police and employees were evacuated.

“We just heard people yelling and screaming at people to get down,” Megan Banton, an administrative assistant in the building, told local television news station WAVY.

One of the victims was shot outside in a car, and the rest were found over three floors of the government building, Police Chief James Cervera said.

Four officers entered the building and located the gunman inside and “immediately engaged” him, Chief Cervera said. The attacker was then killed in an extended exchange of gunfire.

The police chief said the crime scene was “horrific” and could “best be described as a war zone”.