Through a wall at his Rhode Island hotel, Aaron Alexis could hear them - voices harassing him, wanting to harm him. He couldn't sleep. He believed people were following him, using a microwave machine to send vibrations to his body. He changed hotels once, then again. But he called police and told them he couldn't get away from the voices.
On Aug. 7, police alerted officials at the Newport Naval Station about the naval defense contractor's call. But officers didn't hear from him again.
By Aug. 25, Alexis had left the state. The 34-year-old arrived in the Washington area, continuing his work as an information technology employee for a defense-related computer company. Again, he spent nights in different hotels. He suffered from serious mental problems, including paranoia and a sleep disorder, and was undergoing treatment from the Department of Veterans Affairs, according to the law enforcement officials.
But Alexis wasn't stripped of his security clearance, and he kept working.
On Saturday, he visited Sharpshooters Small Arms Range in Lorton, Va., about 18 miles southwest of the nation's capital. He rented an AR-15 rifle, bought bullets and took target practice at the 16-lane indoor range, then bought a shotgun and 24 shells, according to the store's attorney.
The store says it did everything required by law when selling a gun. Alexis asked about buying a handgun but was told he could not purchase a handgun except for delivery to his home state through a federally licensed dealer, NBC News correspondent Michael Isikoff reported. He then bought a Remington 870 Express shotgun after his name, state of residence and other applicable information was approved by the federal NICS system.
Two days later, as the workweek dawned, Alexis entered the sprawling Washington Navy Yard, a 41-acre labyrinth of buildings protected by armed guards and metal detectors where employees must show IDs to get past doors and gates. Authorities believe he drove a rental car there.
He was equipped with his pass for base access - and the shotgun. Within minutes, it would create mayhem.
He stepped inside the massive Building 197, home to some 3,000 employees. He opened fire around 8:15 a.m., raining shotgun blasts down from a fourth-floor overlook and third-floor hallway into a glass-walled cafeteria where employees were eating breakfast.
NBC News correspondent Pete Williams reports the shotgun Alexis used had the words "better off this way" and "my elf weapon" carved into it.
Trained tactical officers arrived, bursting through the building within seven minutes of the first 911 call, and Alexis shot at them, too.
Fire alarms blared, and officers had a hard time hearing one another. A voice came on the overhead speaker telling workers to seek shelter - and later, to head for the gates at the complex. A U.S. Park Police helicopter flew overhead, plucking a wounded woman from the roof with a rescue basket while a crew member armed with a rifle provided cover.
"We have a report on the fourth floor, a male with a shotgun, multiple shots fired, multiple people down. We're still waiting for the OK that the scene has been secured,'' an ambulance crew member says on emergency transmissions posted on Broadcastify.com, a source of live public safety audio feeds.
More dispatches followed: Shooter known to be in the main gate area. Officer down on the third floor. Female on the roof, shot in the shoulder.
Once inside, Alexis picked a handgun off an officer and, armed with two weapons, terrorized the building's occupants. Most of his victims were shot with the shotgun, according to NBC News.
He fired relentlessly not only at police who engaged him but at the workers inside: a 61-year-old marine engineer and grandfather who immigrated to the U.S. years ago from India, a Navy veteran and avid pilot who had once been stationed at Pearl Harbor, a die-hard Washington Redskins fan known for generous bear hugs. A Washington police officer was shot multiple times in the legs but survived.
"We just started running,'' said Patricia Ward, who was in the cafeteria when the shooting began. She said she heard three gunshots in a row, followed by several more.
Descriptions from witnesses and police paint a portrait of harrowing gun battles inside - all for more than half an hour. The FBI, which launched a nationwide active shooter training program for local law enforcement after last December's Connecticut elementary school massacre, says the average mass shooting is over within minutes and often ends once police arrive.
But this gun battle kept going. As the chaos unraveled inside, police in the nation's capital shut down the surrounding area. Nearby schools went on lockdown, flights were halted at Reagan National Airport, and even after Alexis was mortally wounded by a police officer, officers chased leads that a second and possibly a third gunman had been working with him.
Twelve victims died - a body count that police say could have been much higher, even after they determined that the gunman had worked alone. Eight were injured, with all expected to survive.
Two days after the shooting, Alexis' motive remains a mystery. U.S. law enforcement officials told The Associated Press that investigators had found no manifesto or other writings suggesting a political or religious motivation.
Ron Machen, the U.S. Attorney for the District of Columbia, ticked off some of the unanswered questions Tuesday.
"What caused this individual to kill so many innocent men and women? How did he carry out and plan this attack? How did he get access to the weapons? What could have been done to prevent this tragedy? And most importantly, whether anyone else aided or assisted him either wittingly or unwittingly in this tragedy?''
Machen added, "We're not going to stop until we get answers to those questions.''
President Barack Obama, meanwhile, ordered a comprehensive review of security procedures for government contractors and federal employees in the wake of the Navy Yard shootings, NBC News reported. A Pentagon Inspector General report released Tuesday found major flaws in security screening of naval contractors.
As the FBI and other law enforcement agencies prepare to begin day three of their investigation, the building is once again closed to most personnel. Only essential employees will be allowed inside the active crime scene Wednesday.
All surface parking lots and several garages will be open Wednesday allowing those who left their vehicles behind to retrieve them.
MORE COVERAGE ON NBCWASHINGTON.COM: