For much of the day, authorities said they were looking for a possible second attacker who may have been disguised in an olive-drab military-style uniform. But by late Monday night, they said they were convinced the shooting was the work of a lone gunman, and the lockdown around the area was eased.
"We do now feel comfortable that we have the single and sole person responsible for the loss of life inside the base today," Washington police Chief Cathy Lanier said.
President Barack Obama lamented yet another mass shooting in the U.S. that he said took the lives of American "patriots." He promised to make sure "whoever carried out this cowardly act is held responsible."
The FBI took charge of the investigation.
The attack came four years after Army psychiatrist Maj. Nidal Hasan killed 13 people at Fort Hood in what he said was an effort to save the lives of Muslims overseas. He was convicted last month and sentenced to death.
In addition to those killed at the Navy Yard, eight people were hurt, including three who were shot and wounded, according to the mayor. Those three were a police officer and two female civilians, authorities said. They were all expected to survive.
The dead ranged in age from 46 to 73, according to the mayor. A number of the victims were civilian employees and contractors, rather than active-duty military personnel, the police chief said.
At the time of the rampage, Alexis was an employee with The Experts, a company that was a Defense Department subcontractor on a Navy-Marine Corps computer project, authorities said.
Valerie Parlave, head of the FBI's field office in Washington, said Alexis had access to the Navy Yard as a defense contractor and used a valid pass.
Alexis had been a full-time Navy reservist from 2007 to early 2011, leaving as a petty officer third class, the Navy said. It did not say why he left. He had been an aviation electrician's mate with a unit in Fort Worth.