In a mass shooting that sent shock waves through the nation’s capital, the FBI and police were piecing together what led a Navy civilian contractor to kill 12 employees Monday at the Washington Navy Yard and injure several others.

The slayings at the high-security headquarters of the Naval Sea Systems Command in Southeast Washington shattered the calm of a routine start to the workweek shortly after 8 a.m. Police said the gunman, identified as 34-year-old Aaron Alexis of Fort Worth, Texas, gained entry to Building 197 on the sprawling military complex and then went on a deadly rampage inside the building.

Authorities said Alexis, a former full-time Navy reservist, had access to the installation as an employee of a contracting firm working at the facility. Alexis was fatally shot.

A law enforcement official directly briefed on the investigation said authorities believed the gunman used a Remington 870 12-gauge shotgun thought to have been purchased at a gun store in Lorton, Va., a Washington suburb. Authorities were still trying to determine the origins of two others weapons — an AR-15 semiautomatic weapon and Glock handgun — found at the scene, the official said, speaking only on the condition of anonymity.

One scenario being investigated was that the shooter obtained the handgun from an officer who was wounded early in the rampage, then obtained the semiautomatic weapon inside, officials said, cautioning that the evidence analysis was still fluid late Monday night.

After the shooting started, Navy Yard employee Terrie Durham saw the gunman in a hallway as she was helping co-workers to evacuate.

“I could see his face,” Ms. Durham said. “He looked around and fired. We were lucky he was a bad shot.”

Her colleague, Todd Brundidge, said he was about 30 yards away from the gunman. He said the shooter didn’t utter a word, but just “raised the gun and started firing.”

Navy Cmdr. Tim Jirus told reporters that a man from the Washington Navy Yard’s maintenance department was shot next to him as workers fled the building.

“He walked up and told me he heard there was a shooter in our building. We were just standing here maybe three feet away having a conversation and we heard two more gunshots and he went down. That’s when I ran,” Cmdr. Jirus told CNN. “I’m fairly certain he was dead because he was shot in the head. It’s traumatic. I don’t feel lucky he got hit instead of me but I feel lucky to be here.”

The gunman, whose motive remains a mystery, was found dead at the scene after a running gunbattle with police. Two of the wounded are law enforcement officers — D.C. officer Scott Williams and a military base officer, both of whom were expected to survive.

Metropolitan Police Chief Cathy L. Lanier, lifting the “shelter in place” status of the neighborhood near the base, said late Monday that it appeared Alexis was “the single, sole person responsible.”

Mayor Vincent C. Gray said the 12 victims of the gunman ranged in age from 46 to 73. Eight others were injured in the shooting spree but it wasn’t clear whether all of them suffered gunshot wounds. Three people were being treated for gunshot wounds at Medstar Washington Hospital Center.

It was the worst 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 sentenced to death last month.

Investigators did not rule out terrorism as a motive, but officials were characterizing the shooting as an act of violence. Mr. Gray said of speculation about terrorism that “we don’t have any reason to think that at this stage.”

First responders at the Navy Yard found a scene of carnage and chaos, as police searched for as many as three gunmen, based on initial reports. Many of the building’s 3,000 employees evacuated, but thousands of other workers sheltered in place.

Authorities closed roads and locked down schools nearby during the hourslong search. Departing flights were halted at Ronald Reagan Washington National Airport, and the Washington Nationals postponed their game at nearby Nationals Park.

The Senate went into lockdown as well, though the House did not and Sergeant at Arms Terrance W. Gainer was forced to send out a letter publicly defending his decision.

Public officials contributed to the initial public confusion, releasing conflicting accounts of how many gunmen were on the loose. Chief Lanier said one of the two gunmen they were looking for was a white man wearing a khaki Navy uniform and a beret, and carrying a handgun. The other was a black man, about 50 years old, who was believed to be carrying a “long gun.”

Authorities later ruled out the white man as a suspect, but it was unclear Monday night whether Alexis carried out the attack alone. Police didn’t say whether Alexis was shot by law enforcement officers, or took his own life.

At a hospital where some of the victims were being treated, Secretary of the Navy Ray Mabus said the service was reeling from the mass shooting.

“The Navy family today suffered a horrific attack-and we are a family,” he said. “The civilians that work in the Navy and do the critical work that has to be done suffered just a stunning and horrific blow today.”

As worried families waited for news of loved ones, the names of the dead were not released immediately to the public. Mr. Mabus said it could take another day until everyone is accounted for.

An official list of victims was not planned to be released until 24 hours after families had been notified.

President Obama expressed dismay at “yet another mass shooting,” and said justice must be sought.

“I’ve made it clear to my team that we want the investigation to be seamless, so that local and federal authorities are working together,” he said.

But as soon as he expressed his sympathy for the victims, Mr. Obama made an awkward pivot to a highly partisan speech in which he warned that congressional Republicans were threatening an economic crisis in their ongoing budget battles.

Out of respect for the shooting victims, the White House canceled a “Musica Latina” event that was to have been held Monday night. Mr. Obama also issued a proclamation calling for flags to be flown at half-staff until Sept. 20 “as a mark of respect for the victims of the senseless acts of violence.”

Other Democrats were far more explicit in calling for a political response to the latest in a string of mass shootings over the past couple of years.

“When will enough be enough?” said Sen. Dianne Feinstein, California Democrat. “Congress must stop shirking its responsibility and resume a thoughtful debate on gun violence in this country. We must do more to stop this endless loss of life.”

As investigators searched for answers, the FBI released a bulletin asking for the public’s help in learning more about Alexis. The bulletin said that he was born in Queens, N.Y., and was 6 feet 1 inches tall, and weighed 190 pounds.

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

“No piece of information is too small,” she said. “We are looking to learn everything we can about his recent movements, his contacts and his associates. We ask the public to look at the photos of the deceased shooter.”

The Navy said Alexis joined the service in May 2007 and worked at the Naval Air Station Joint Reserve Base in Fort Worth, Texas. He was detached in January 2011. He had most recently worked in Fleet Logistics Support Squadron (VR) 46, in Fort Worth.

It was unclear why Alexis left the Navy. But during the time he served, he rose to the rank of aviation electrician’s mate 3rd class.

Alexis had at least two minor brushes with the law previously. In Fort Worth in 2010, he was charged with discharging a firearm, but the case wasn’t prosecuted.

In Seattle in 2004, he was charged with shooting out the tires of someone else’s car. Alexis told detectives he experienced an angry “blackout” after he felt some construction workers “disrespected” him.

Sign up for Daily Newsletters Manage Newsletters

Copyright © 2020 The Washington Times, LLC. Click here for reprint permission.