The man who killed 12 people in a shooting spree at his Virginia Beach workplace resigned shortly before carrying out the attack, city officials have confirmed.

NPR had previously reported that according to former colleagues of the alleged gunman, he had put in his two-week notice ahead of the shooting. On Sunday, that development was confirmed for the first time by Virginia Beach City Manager Dave Hansen, who said the the shooter emailed his resignation hours before the killings took place.

At a press briefing, top city officials said they are exploring how the resignation of shooter DeWayne Craddock, 40, who was a longtime government engineer, played into a possible motive.

Before confirming the resignation, Hansen and Virginia Beach Police Chief James Cervera said repeatedly that the gunman had not been terminated or forced out of his job with the Virginia Beach city government.

He did, however, leave voluntarily, though officials did not say why.

"We have an open investigation just in its third day. This includes establishing a motive," Hansen said. "Whether employment status had anything to do with these events? That will be part of the ongoing investigation."

The gunman died in what authorities described as a long gunfight with police.

At the home of a member of Craddock's family in Yorktown, Va., about an hour outside Virginia Beach, a note affixed to the door extends "heartfelt condolences" to the victims.

The note reads:

"The family of DeWayne Craddock wishes to send our heartfelt condolences to the victims. We are grieving the loss of our loved one. At this time we wish to focus on the victims and the lives loss during yesterdays tragic event. Our thoughts and prayers are with the families of those who loss their lives, and those recovering in the hospital. —The Craddock's"

An NPR reporter's knock on the door of the home went unanswered.

NPR's Brakkton Booker contributed to this report.

Copyright 2019 NPR. To see more, visit