WASHINGTON — A gunman was dead and the police were looking for two other potential gunmen after a shooting Monday morning that left at least 12 people dead and several injured at a naval office building not far from Capitol Hill and the White House, according to law enforcement officials.

The authorities have identified the dead suspect as a man in his 40s, according to a senior law enforcement official, who did not want to release the man’s name because there had been earlier confusion about his identity.

Several identification cards were found around the dead man, and it took officials time to sort out his identify, the official said. Ultimately, the authorities had to identify him using his fingerprints, according to the official. Three weapons were found on the suspect: an AR-15 assault rifle, a shotgun and a semiautomatic pistol, the official said.

“It’s hard to carry that many guns, so there is some thinking that he may have taken some of them from security or whoever else he shot,” the official said. “We still don’t know how they were bought, but they are chasing that down now.”

Officials said that one police officer was in surgery after being shot in an exchange of gunfire with a gunman. That gunman is dead, said Cathy L. Lanier, the chief of the Metropolitan Police Department.

The police were still looking for what Chief Lanier called two other possible gunmen.

“The big concern for us right now is that we potentially have two other shooters that we have not located at this point,” Chief Lanier said at a brief news conference outside the Washington Navy Yard, where the shooting took place. She was flanked by other police officials and by Mayor Vincent C. Gray.

“As far as we know, this is an isolated incident,” Mr. Gray said. He said the police were asking “all the residents to stay out of the area.”

Other law enforcement officials said the reports of additional gunmen could be a result of the chaos during the episode.

Police officials had said that at least 10 people were shot, including two police officers, and that three people were in critical condition. Chief Lanier said that there were “multiple victims inside that are deceased” at the scene.

One victim, described as a man in his 60s, was shot in the left temple and was pronounced dead within a minute of arriving at George Washington University Hospital. “This injury was not survivable by any stretch,” a hospital official told reporters. “The patient was dead on the way to the hospital.”

Hundreds of police officers and naval officers surrounded the Naval Sea Systems Command headquarters, where about 3,000 service members, civilians and contractors work on the Navy’s fleet. Security at the Capitol was enhanced, and the local news media reported that several schools were put on lockdown. Security around the Pentagon was visibly increased after the shooting.

Investigators were trying to determine whether any of the suspected gunmen had official access to the Navy Yard. The site is protected by a high wall, with entry through checkpoints that require official identification. However, under the “force protection status” that was believed to have been in effect early Monday, someone with official access to the site could have driven a car into the parking lot without having the trunk inspected, or could have entered on foot without a bag being searched.

An individual fired shots at 8:20 a.m. at the Washington Navy Yard, in the southeast part of the city, the Navy said on Twitter. Workers were told to shelter in place, and emergency personnel were on the scene.

Officials at MedStar Washington Hospital Center said three individuals with gunshot wounds, including one police officer, had arrived at the trauma center and were being treated.

Janis Orlowski, the chief medical officer at the hospital, said the three victims were in critical condition but were “alert” and “responsive,” even as doctors prepared for surgery.

“They do have severe injuries, but we’ve been able to speak to all of them,” Ms. Orlowski said. “We understand there are individuals who will not be transported because they are deceased.”

But she added that the authorities at the Navy Yard had told the hospital to expect more victims.

Of the three who had already arrived, she said, one had multiple gunshot wounds to the legs. Another was shot in the shoulder. The third had a gunshot wound to the head, she said.

“The operating room is ready for these individuals,” she said. “I have surgeons. I have nurses. We have trauma specialists. They have told us they believe there will be more victims coming.”

Ms. Orlowski said that she believed that the gun used in the attack was most likely a semiautomatic rifle.

“From the reports of the victims, it had to be a semiautomatic, because they are talking about shots in rapid fashion,” she said.

President Obama said that “whoever carried out this cowardly act” would be held responsible, and he praised as “patriots” the victims of the shooting.

“We still don’t know all the facts, but we do know that several people have been shot and some have been killed,” Mr. Obama said before beginning an event marking the fifth year since the 2008 economic collapse. “So we are confronting another mass shooting, and today it happened on a military installation in our nation’s capital.”

Mr. Obama said that he had told officials to make sure the investigation was “seamless,” and that there would be time to honor the victims as more became known about who they were.

“They are patriots,” Mr. Obama said. “They know the dangers of serving abroad. But today they faced the unimaginable violence that they wouldn’t expect here at home.”

The Navy Yard sits on the waterfront along the Anacostia River in southeast Washington, near Nationals Park, where Washington’s baseball team plays. It is also at one end of the 11th Street Bridge, one of the major thoroughfares that bring traffic into the city from Maryland.

Adm. Jonathan W. Greenert, a four-star admiral, a member of the Joint Chiefs of Staff and the chief of Naval Operations, was evacuated from his residence at the Navy Yard complex, along with his wife, shortly after the first report of shots fired, according to Navy officials.

Military helicopters circled the facility as police vehicles and other emergency vehicles rushed to the Navy Yard. A helicopter lowered a basket to the roof of one of the buildings and appeared to be taking away victims.

Officials at the nearby Reagan National Airport briefly stopped airplanes from taking off or landing because of the shooting, according to a spokeswoman at the airport’s media office. The stoppage began just before 10 a.m. and was lifted at 10:14 a.m., said Laurie Weaver, the spokeswoman.

Patricia Ward, a logistics management specialist from Woodbridge, Va., was in the cafeteria on the first floor when the shooting started. “I heard three gunshots, pow, pow, pow, straight in a row,” she said. “About three seconds later, there were four more gunshots, and all of the people in the cafeteria were panicking, trying to figure out which way we were going to run out.”

“The workers in the cafeteria wanted us to stay there,” she added, “but I just ran, I ran out the side doors.”

She added that someone had pulled a fire alarm, and that many people just started to run away.

Employees who had been evacuated from the building described a chaotic situation as an individual armed with a rifle roamed the hallways shooting at people.

Cmdr. Tim Jirus said he was on the fourth floor of the building when he heard gunshots and saw people start running through the office.

“I heard a number of what I thought were like cap-gun shots, based on distance, inside the building,” he said.

Commander Jirus 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, Commander Jirus said.

“We had a conversation for about a minute,” he said. “I heard two gunshots, and he went down, and then I ran back here.”

Holding a radio as he waited outside the Navy Yard Metro station, Commander Jirus said he had heard that another man in his office, also a civilian, had been shot and evacuated to a hospital.

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

A 34 year old USG contractor employee and former Navy reservist with a history of behavioral health issues was separated from military service with a General discharge...he was frustrated and angry about his pay!

Many continued prayers are extended to the family and friends of all the victims!

Thus, I quite often comment that "possessing well-informed knowledge is truly a powerful equalizer."

A 34 year old USG contractor employee and former Navy reservist with a history of behavioral health issues was separated from military service with a General discharge...he was frustrated and angry about his pay!

Many continued prayers are extended to the family and friends of all the victims!

Thus, I quite often comment that "possessing well-informed knowledge is truly a powerful equalizer."

Sadly, one of the first news reports stated this shooter was Navy discharged for "patterns of misconduct" - honorable.

Does make me wonder if the Navy - ONCE AGAIN - admin discharged a SM through this venue in order to avoid an MEB for a possible condition that this SM may have incurred while in the Navy - and thereby avoid the diagnosis and treatment and compensation of possible MH issue.

I have said all along that getting rid of SMs through this back door is doing more harm than good as SMs who have issues are not being evaluated/diagnosed/treated. They are simply "sloughed off" by the Services (Penny wise for the branches) and being inserted into the general population undiagnosed/untreated. They can eventually become ticking time bombs & end up coming to a neighborhood near you soon (pound foolish)!

Regardless of this current situation, this is indeed a very sad time and moment for us all.

But I do have concerns about the impacts of admin discharging SMs under some of these "misconduct discharges" as I suspect there may be former SMs running around out in the general population who need help and that they perhaps had needed help PRIOR to their admin discharge and did not, or are/were not required by their branch of service to have had a full MH exam prior to these type of discharges.

Sadly, one of the first news reports stated this shooter was Navy discharged for "patterns of misconduct" - honorable.

Does make me wonder if the Navy - ONCE AGAIN - admin discharged a SM through this venue in order to avoid an MEB for a possible condition that this SM may have incurred while in the Navy - and thereby avoid the diagnosis and treatment and compensation of possible MH issue.

I have said all along that getting rid of SMs through this back door is doing more harm than good as SMs who have issues are not being evaluated/diagnosed/treated. They are simply "sloughed off" by the Services (Penny wise for the branches) and being inserted into the general population undiagnosed/untreated. They can eventually become ticking time bombs & end up coming to a neighborhood near you soon (pound foolish)!

Regardless of this current situation, this is indeed a very sad time and moment for us all.

But I do have concerns about the impacts of admin discharging SMs under some of these "misconduct discharges" as I suspect there may be former SMs running around out in the general population who need help and that they perhaps had needed help PRIOR to their admin discharge and did not, or are/were not required by their branch of service to have had a full MH exam prior to these type of discharges.