Authorities said they were looking for a second possible attacker who may have been disguised in a military-style uniform.
Investigators said they had not established a motive for the shooting rampage, which unfolded in the heart of the nation’s capital, less than four miles 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.” But he said the possibility had not been ruled out.
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.”
It was the deadliest shooting at a U.S.-based military installation since Maj. Nidal Hasan killed 13 people and wounded 30 others in 2009 at Fort Hood in Texas. He was convicted last month and sentenced to death.
The FBI took charge of the investigation at the Navy Yard and identified the gunman killed in the attack as 34-year-old Aaron Alexis of Texas. He died after a running gunbattle with police, investigators said.
A federal law enforcement official who was not authorized to discuss the case publicly and spoke on condition of anonymity said Alexis was believed to have gotten into the Navy Yard by using someone else’s identification card.
It was not clear if that person was an accomplice or if the ID was stolen, authorities said.
The Navy said Alexis was a full-time reservist from 2007 to early 2011, and left as a petty officer third class. It was not immediately clear why he left.
He had been working for a fleet logistics support squadron in Fort Worth, Texas. The Navy listed his home of record as New York City.
In addition to those killed, at least three people — a police officer and two female civilians — were wounded. They were listed in stable condition and were expected to survive.
The rampage took place at Building 197, the headquarters for Naval Sea Systems Command, which buys, builds and maintains ships, submarines and combat systems. About 3,000 people work at headquarters, many of them civilians.
The Washington Navy Yard is a sprawling labyrinth of buildings and streets protected by armed guards and metal detectors, and employees have to show their IDs at doors and gates to come and go.
Witnesses described a gunman opening fire from a fourth-floor overlook, aiming down on people in the cafeteria on the main floor. Others said a gunman fired at them in a third-floor hallway. It was not clear whether the witnesses on different floors were describing the same gunman.