FOR MORE INFORMATION

Navy Secretary Ray Mabus said it could take 24 to 35 hours for Navy officials to account for everyone. He provided two telephone numbers people can call to check on family members who may have been at the Navy yard: 202-433-6151 and 202-433-9713. The FBI also asked people to go to its website, www.fbi.gov, and look at photos of the shooter, Aaron Alexis, to see if they recognize him and can provide details about him.

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.

Investigators said they had not established a motive for the attack, which 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.

It was the deadliest shooting rampage at a U.S.-based military installation since Maj. Nidal Hasan killed 13 people and wounded more than 30 others in 2009 at Fort Hood in Texas. He was convicted last month and sentenced to death.

President Barack Obama said he was mourning “yet another mass shooting” and called it a “cowardly act.” Despite a string of shootings during his presidency, Obama has been unable to get gun control legislation passed amid a fierce backlash from conservative politicians and the gun industry lobby.

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. Authorities said he was working in information technology with a company that was a Defense Department contractor, but it wasn’t clear if he was assigned to the Navy Yard. As a contractor, he could have had a badge that might have gained him access to the base.

Shortly after the shootings, police said they were looking for as many as three gunmen. But it was unclear whether there were in fact multiple gunmen, or witnesses had given conflicting descriptions of the same man. As the day wore on, attention focused on Alexis.

The Navy said he was a full-time reservist from 2007 to early 2011 and worked in a fleet logistics support unit in Texas. It was not immediately clear why he left.

Officials said at least three people were critically wounded in the rampage, including a law enforcement officer who District of Columbia Police Chief Chief Cathy L. Lanier said was shot in an exchange of fire with the gunman. Hospital officials said all three were expected to recover.

Investigators said they had not established a motive for the rampage, which unfolded 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.”

Valerie Parlave, assistant director of the FBI’s Washington field office, urged members of the public to look at pictures of Alexis on the FBI website and to call with any information they may have about him.

“No piece of information is too small,” Parlave said. “We are looking to learn everything we can about his recent movements, his contacts and his associates.”

The shooting led to tightened security at the Capitol and White House nearby, including shutting down the Senate while the possible remaining shooters were sought. Lanier announced the death toll and said people were being told to stay in their homes and out of the area.

The Washington Nationals postponed a game against the Atlanta Braves at Nationals Park, next to the Navy Yard.

A city already on edge was further shaken Monday evening when someone tossed firecrackers over the fence at the White House, causing loud bangs and prompting a swift response from Secret Service agents, who tackled a man in white shorts and a T-shirt on Pennsylvania Avenue.

Witnesses to the Navy Yard shootings described a gunman firing down on a cafeteria from an upper floor and a gunman firing at people in a hallway on another floor. It wasn’t clear whether the witnesses were describing the same gunman.

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.

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. “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.’”

Cmdr. Tim Jirus said he was on the fourth floor when he heard gunshots and saw people start running through the office. He said he was at the back of the building working to get people out when a man came out of a maintenance building and approached him, asking about the shooting. Moments later, the man, a civilian, was shot in the head, he said.

“I heard two gunshots, and he went down, and then I ran back here,” Jirus said.

Asked how he escaped when the man next to him was shot, he said: “Luck. Grace of God. Whatever you want to call it.”