VIRGINIA BEACH, Va. — A longtime city employee shot and killed 12 people and injured four others after opening fire late Friday afternoon in the public works building where he worked, police said. The shooter was then killed by officers after firing at them.

One officer was shot during the exchange, but was saved by his bullet-proof vest, Police Chief James Cervera said during a news conference a couple of hours after the shooting.

Cervera said the shooter shot “indiscriminately.”

The shooter was described as a disgruntled employee of the Public Utilities Department, Cervera said.

Police did not release the shooter’s name.

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

Megan Banton, an administrative assistant, was in the building when the gunman began firing shortly after 4 p.m.

She said her supervisor pulled her and others into an office and shoved a desk against the door while Banton called 911.

“It felt like forever,” Banton, 30, said.

Banton said some people in the office were crying; others appeared nervous while some stayed silent.

“You never think this is going to happen to you. When it happens to you, it’s totally different,” she said.

Banton said she texted her mother, telling her that they were waiting for police.

“Thank God my baby is OK,” Banton’s mother, Dana Showers, said.

Arthur Felton, an 18-year employee in the planning department, was also inside when the shooting started.

He evacuated the building after a coworker heard gunshots.

“I never thought this would happen in my building,” Felton said.

Five of the injured were being treated at Sentara Virginia Beach General Hospital and a sixth was transferred to the Trauma Center at Sentara Norfolk General Hospital, Sentara Healthcare tweeted.

Relatives of victims were told to gather at the Princess Anne Middle School for updates, even as representatives from the medical examiner’s office were headed to the scene.

Paul Swain, 50, was among those who arrived at the school to reunite with loved ones who were in the building during the shooting.

He said he saw his fiancee from across the parking lot, clearly in an agitated state.

“I think she knew some of the people,” he said.

Police and other public safety workers were busy processing the crime scene and trying to identify the victims Friday night.

The shooting sent shockwaves through Virginia Beach, the state’s largest city and a popular vacation spot in southeastern Virginia.

Gov. Ralph Northam, who was en route to the city Friday night, called it a “tragic day for Virginia Beach and our entire Commonwealth. My heart breaks for the victims of this devastating shooting, their families, and all who loved them.”

Public Works spokesman Drew Lankford, who works in the Operations building, left the office Friday afternoon to get a haircut. While he was gone, his daughter called and said there had been a shooter in his work building.

His daughter, who works in the City Hall building, said security told everyone to get under their desks. He rushed back to the office and saw officers taking cover behind parked cars with their guns drawn.

City Councilwoman Barbara Henley had just pulled up to the City Hall building when she heard sirens and saw police cars.

“I thought it was an accident,” Henley said.

As she parked her car, she noticed city employees standing outside using their cellphones. Someone told her there was a shooting and she should leave. Henley had just gotten back in her car when she heard a voice shout, “Get down!”

People scattered.

“I was scared to death,” Henley said.

She quickly drove home.

Henley said she’d never seen a similar situation at the Municipal Center, adding that security was recently “beefed up” in the City Hall building as a result of shooting incidents across the nation, but that some of the other municipal buildings do not take the same security measures.

Sheila Cook, who was in the courthouse building in the complex, told a local television news station she heard muffled gunshots but knew it wasn’t in her building.

She said police acted quickly in telling people that they were safe after the shooter had been apprehended.

Cervera, the police chief, said it was too soon to provide details of the suspected shooter or how it unfolded, though it appeared to be quick. He said officers entered the building shortly after the first calls and confronted the gunman.

Christina Pullen, a spokeswoman for the FBI in Norfolk, said the bureau is assisting in the investigation.

“There is no way to describe an incident such as this,” Cervera said. “The suspect was immediately confronted. ... our citizens can rest easy tonight. We do not have someone out in the community to do more harm.”

Virginian-Pilot staff writer Sara Gregory, Associated Press and Washington Post contributed.