Twelve people were shot dead, and six injured, as a gunman stormed a public building in Virginia Beach and opened fire indiscriminately in America's latest mass shooting.

The gunman, DeWayne Craddock, 40, who also died, was a local utilities engineer formerly employed by the city of Virginia Beach, and was described by police as a "disgruntled employee".

“This is the most devastating day in the history of Virginia Beach,” said Virginia Beach Mayor Bobby Dyer. "The people involved are our friends, co-workers, neighbours and colleagues."

Craddock carried out the mass shooting in a building that houses the city's public works and utilities offices, around 4pm local time, as employees were still at their desks.

He stalked through several floors as he opened fire indiscriminately at former colleagues, using a 45 caliber handgun with extended magazines and a sound suppressor, according to police.