Twelve people were killed and four more were injured in a mass shooting by a “disgruntled” government employee at a municipal building in Virginia.

DeWayne Craddock, who worked for the Virginia Beach public utilities department, opened fire “indiscriminately” upon his colleagues shortly after 4pm on Friday, said police.

The 40-year-old engineer was shot dead after a long gun battle with four police officers, one of whom was injured, according to police chief James Cervera.

Municipal workers described hiding in offices and under desks as the suspect shot victims on three floors of the building.

Megan Banton, an administrative assistant, said she heard gunshots, called police and barricaded herself and about 20 colleagues inside an office, pushing a desk against a door.

“We tried to do everything we could to keep everybody safe,” she said. “We were all just terrified. It felt like it wasn’t real, like we were in a dream. You are just terrified because all you can hear is the gunshots.”

Cheryl Benn, 65, said her husband David, a traffic engineer with the city, had called her from a barricaded room to say he initially thought it was someone working with a nail gun until he saw the bodies.

“This is unbelievable for Virginia Beach,” Ms Benn said. “By and large, it’s a pretty calm and peaceful place to live.”

Police entered the building and evacuated as many employees as they could before exchanging fire with the suspect. One of the officer’s life was saved by his bulletproof vest.

One of the victims was found shot dead inside a vehicle outside the municipal building. Ten others were killed inside and one more died on the way to hospital.

On Saturday morning the 11 city employees were identified as Laquita Brown, Tara Welch Gallagher, Mary Louise Gayle, Alexander Mikhail Gusev, Katherine Nixon, Richard Nettleton, Christopher Kelly Rapp, Ryan Keith Cox, Joshua Hardy, Michelle “Missy” Langer and Robert “Bobby” Williams. The 12th victim, Herbert “Bert” Snelling, was a contractor filling a permit.

Story continues

Pictures of the 12 victims were shown at a press conference (AFP/Getty)

The city’s mayor, Bobby Dyer, called it “the most devastating day in the history of Virginia Beach”.

“A senseless crime happened that imposed tremendous grief upon the people of Virginia Beach, the commonwealth and this country,” he added.

Virginia governor Ralph Northam said in a statement he was devastated by the “unspeakable, senseless violence”, and is offering the state’s full support to survivors and relatives of the victims.

“That they should be taken in this manner is the worst kind of tragedy,” the governor said during the news conference.

The attack took place less than 24 hours before Virginia Beach Police Department was due to hold a “Citizens Defence” workshop to offer advice on what to do during mass shootings. The event has been cancelled.

A .45-calibre handgun with a suppressor and extended magazines was recovered from the scene, according to officials. Two law enforcement sources told CNN the weapons were legally purchased recently.

Craddock appears to have had no major criminal convictions and online records suggested he served in the National Guard.

Dave Hansen, the city manager, said Craddock was still employed by the government at the time of the shooting and had a security pass that allowed him access to nonpublic areas of the municipal building.

Officials refused to comment on whether Craddock was facing disciplinary or termination proceedings.

Virginia Beach police are still investigating a motive and Mr Cervera said his name will only be mentioned once by the force. “He will be forever referred to as ‘the suspect’, because our focus now is the dignity and respect for the victims of this case and to their families,” he said.

The police chief said that officers gave the suspect first aid after he was shot, but he died.

A neighbour of the suspect told a local TV station that Craddock “seemed like a nice guy.” Cassetty Howerin, 23, said: “I’m petrified, because I live right under him so that could’ve been easily me, or my girlfriend, or my roommate.”

Virginia Beach is the state’s largest city and a popular holiday spot. The building where the attack took place is in a suburban complex miles away from the high-rise hotels along the beach and the downtown business area.

Additional reporting by Associated Press