WASHINGTON (AP) -- A former Navy reservist went on a shooting rampage Monday inside a building at the heavily secured Washington Navy Yard, firing from a balcony onto office workers in an atrium below, authorities and witnesses said. Thirteen people were killed, including the gunman.
Authorities said they were looking for a possible second attacker who may have been disguised in an olive-drab military-style uniform.
But as the day wore on and night fell, the rampage increasingly appeared to be the work of a lone gunman.
The attack unfolded about 8:20 a.m. in the heart of the nation's capital, less than four miles from the White House and two miles from the Capitol.
PICTURES: Shooting at Navy Yard in Washington D.C. (http://bit.ly/dcnavyyard)
RELATED: Navy commander narrowly escapes death (http://bit.ly/17FiqcS)
Investigators said the motive was a mystery.
Mayor Vincent Gray said there was no indication it was a terrorist attack. But he said the possibility had not been ruled out.
It was the deadliest shooting at a military installation in the U.S. since Maj. Nidal Hasan killed 13 people and wounded more than 30 in 2009 at Fort Hood in Texas. He was convicted last month and sentenced to death.
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 and identified the gunman killed in the attack as 34-year-old Aaron Alexis of Texas. He died after a running gunbattle inside the building with police, investigators said.
At the time of the rampage, Alexis was working in information technology with a company that was a Defense Department subcontractor.
Authorities said he may have had a badge that enabled him to get onto the base, but they were still investigating.
MORE: Who was Aaron Alexis? (http://bit.ly/18raLfd)
Alexis was 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, Texas.
Alexis had had run-ins with the law over shooting incidents in 2004 and 2010 in Fort Worth and Seattle and was portrayed in police reports as seething with anger.
Witnesses on Monday 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.
Patricia Ward, a logistics-management specialist, said she was in the cafeteria getting breakfast.
"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 said.
In addition to those killed, more than a dozen people were hurt, including a police officer and two female civilians who were shot and wounded. They were all expected to survive.
Police would not give any details on the gunman's weaponry, but witnesses said the man they saw had a long gun -- which can mean a rifle or a shotgun.
The Washington Navy Yard is a sprawling, 41-acre labyrinth of buildings and streets protected by armed guards and metal detectors, and employees have to show their IDs at doors and gates. More than 18,000 people work there.
RELATED STORY: Washington Navy Yard has long, colorful history (http://bit.ly/navyyardhistory)
The rampage took place at Building 197, the headquarters for Naval Sea Systems Command, which buys, builds and maintains ships and submarines. About 3,000 people work at headquarters, many of them civilians.
Todd Brundidge, an executive assistant with Navy Sea Systems Command, said he and co-workers encountered a gunman in a long hallway on the third floor. The gunman was wearing all blue, he said.
"He just turned and started firing," Brundidge said.
Terrie Durham, an executive assistant with the same agency, said the gunman fired toward her and Brundidge.
"He aimed high and missed," she said. "He said nothing. As soon as I realized he was shooting, we just said, `Get out of the building."'
As emergency vehicles and law enforcement officers flooded streets around the complex, a helicopter hovered, nearby schools were locked down and airplanes at nearby Reagan National Airport were grounded so they would not interfere with law-enforcement choppers.
Security was tightened at other federal buildings. Senate officials shut down their side of the Capitol while authorities searched for the potential second attacker. The House remained open.
In the confusion, police said around midday that they were searching for two men who may have taken part in the attack -- one carrying a handgun and wearing a tan Navy-style uniform and a beret, the other armed with a long gun and wearing an olive-green uniform. Police said it was unclear if the men were members of the military.