Officials said at least three people were critically wounded in the rampage, including a law enforcement officer. Hospital officials said all three were expected to recover.
Alexis had been arrested in Seattle in 2004 for shooting out the tires of a parked car in what he described as an anger-fueled "black out." Two construction workers told police that Aaron Alexis walked out of a home next door on May 6, 2004, pulled a pistol from his waistband and fired three shots into the rear tires of their parked car. Alexis later told police he thought the victims had "disrespected him." Court records show he was released on the condition he not have contact with any of the workers.
Investigators said they had not established a motive for the shooting rampage, which unfolded less than four miles (less than 7 kilometers) from the White House. As for whether it may have been a terrorist attack, Mayor Vincent Gray said: "We don't have any reason to think that at this stage."
The shooting led to tightened security at the Capitol and White House nearby, including shutting down the Senate while a possible remaining shooter was sought. City Police Chief Cathy Lanier announced the death toll and said people were being told to stay in their homes and out of the area.
Witnesses described a gunman opening fire from a fourth-floor overlook, aiming down on people on the main floor, which includes a glass-walled cafeteria. Others said a gunman fired at them in a third-floor hallway.
The shooting quickly reignited the debate over gun control in the United States, but it was far from certain what the impact would be.
The politics of gun control have only gotten tougher since December's shooting at Connecticut's Sandy Hook Elementary School. That shooting, which killed 20 first-graders and six staffers, spurred Obama to propose stricter firearms laws.
White House spokesman Jay Carney on Monday reiterated the Obama's commitment to strengthening gun laws, including expanding background checks to sales online and at gun shows.
Gun owners, aided by their advocates at the National Rifle Association, the country's largest gun lobby, have successfully fought Obama's legislation, even though polls show broad support for tougher gun laws.
About 3,000 people work at the Naval Sea Systems Command headquarters, which builds, buys and maintains the Navy's ships and submarines and combat systems.
Todd Brundidge said he and other co-workers encountered a gunman in a hallway on the third floor. The gunman was wearing all blue, he said.
"He just turned and started firing," Brundidge said.
Terrie Durham added, "He aimed high and missed. He said nothing. As soon as I realized he was shooting, we just said, 'Get out of the building.'"
Rick Mason said a gunman was shooting from a fourth-floor overlook in the hallway outside his office. He said the gunman was aiming down at people in the building's cafeteria. Mason said he could hear the shots but could not see a gunman.
Mason said there are multiple levels of security to reach his office. That "makes me think it might have been someone who works here," he said.
Patricia Ward said she was in the cafeteria.
"It was three gunshots straight in a row pop, pop, pop. Three seconds later, it was pop, pop, pop, pop, pop, so it was like about a total of seven gunshots, and we just started running," Ward told reporters.
___
Associated Press writers Lolita C. Baldor, Stacy A. Anderson and Ben Nuckols in Washington contributed to this report.