A disgruntled city employee shot and killed 12 people and injured four more Friday when he opened fire inside a Virginia Beach municipal building before he was killed by police, authorities said Friday.

DeWayne Craddock, 40, was a longtime public utility worker who made multiple firearm purchases in recent weeks, officials told the Wall Street Journal. Police did not release the suspect's name or describe a possible motive for the attack.

"This is the most devastating day in the history of Virginia Beach," Mayor Bobby Dyer said at a news conference. "The people involved are our friends, coworkers, neighbor, colleagues."

"This is the most devastating day in the history of Virginia Beach. The people involved are our friends, coworkers, neighbor, colleagues." — Virginia Beach Mayor Bobby Dyer

Four people were in surgery Friday night, Virginia Beach police Chief Jim Cervera said.

The suspected shooter died in a gunfight with police officers. A police officer was also wounded, but was saved by his bullet-proof vest, Cervera said.

"I can tell you that it was a long gunbattle between those four officers and that suspect," Cervera said.

Authorities said via social media they believed there was just one shooter involved at the Virginia Beach Municipal Center, which houses more than 400 workers. The White House said President Trump had been briefed and was monitoring the situation.

Police raided the suspect’s condominium several miles away from the municipal center Friday night, Fox News affiliate WAVY News 10 reported. Neighbors told the station he was a quiet person who kept to himself and one said she never imagined he would do something like that.

GUNMAN ACCUSED OF SHOOTING EX ADMITS HE LIED ABOUT AIMING AT BEAR, AUTHORITIES SAY

As the dramatic event was unfolding, Virginia Gov. Ralph Northam urged his constituents to stay away from the area and abide law enforcement warnings in a tweet on Friday.

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

The shooting occurred shortly after 4 p.m. when the suspect entered Building 2 of the center and “immediately began to indiscriminately fire upon all of the victims,” Cervera said. The building houses departments such as planning, public works and public utilities, and employees were seen exiting the building in tears, with some in need of medical assistance, according to reports by WAVY News 10.

One victim was in his vehicle when he was shot, Cervera said.

Officers entered the building and exchanged fire with the shooter. The officers rendered first aid on the suspect when he was shot, Cervera said.

Officers found victims on all three of the building's floors, Cervera said. They also found a .45-caliber handgun with large empty magazines and a silencer.

"The suspect was reloading extended magazines in that handgun, firing at victims throughout the building and at our officers," Cervera said.

It was not known if the weapons were purchased legally.

Christina Pullen, a spokeswoman for the FBI in Norfolk, said the bureau responded to assist Virginia Beach police, the Associated Press reported.

According to the Virginian-Pilot, City Council Member Barbara Henley had just pulled up to the City Hall building just after 4 p.m. to pick up a meeting agenda when she heard sirens and saw police cars.

"I thought it was an accident," Henley said, according to the paper.

Megan Banton, an administrative assistant in the public utilities office where the gunman worked, said she called 911 and barricaded the 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.”

Public Works spokesman Drew Lankford told the paper he left the building to get a haircut. He received a call from his daughter, who also works in the building, that there was a shooter and that security instructed everyone to get underneath their desks.

One man was texting with his fiancée who was hiding on the floor inside the building. He told WAVY News 10 he texted “I love you” as he rushed to the center, just in case.

"This day will not define Virginia Beach," Councilman Aaron R. Rouse said during the news conference. "We will come together. We will show the strength of our city."

CLICK HERE FOR THE FOX NEWS APP

U.S. Sen. Tim Kaine, D-Va., said he was devasted by news of the shooting.

"I’m devastated to learn of the tragic shooting tonight in Virginia Beach. My heart is with everyone who lost a loved one, and I’m praying for a swift recovery for all those who have been injured," tweeted.

Sen. Mark Warner, D-Va., wrote: "Praying for all involved as we learn more."

Several Democratic presidential candidates also tweeted their condolences over Friday's events.

By Saturday morning, Facebook had set up a crisis response alert to help people locate their loved ones.

The Associated Press contributed to this report. This is a developing story. Check back soon for updates.