A Pentagon police officer was killed Tuesday during an attack at a bus platform outside the military headquarters that prompted gunfire, a lockdown of the sprawling facility in Virginia and a massive police and fire response, officials said.

The officer’s apparent assailant also was killed in the encounter, according to two law enforcement officials who spoke on the condition of anonymity to comment on an investigation that they were not authorized to discuss publicly. The officials said there was nothing to indicate terrorism was a motive.

But the circumstances of what transpired remained murky. During an afternoon news conference, Pentagon Force Protection Agency Chief Woodrow Kusse offered scant details and repeatedly deflected reporters’ questions about what had happened.

“The situation has been resolved,” Kusse said, “but the investigation must continue, and I don’t want to do anything to jeopardize the integrity of the process.”

A police officer was fatally stabbed in a violent encounter outside the Pentagon on Aug. 3. The officer’s alleged assailant was also killed. (Hadley Green/The Washington Post)

Kusse said the officer, who was not named, was attacked on the Metro bus platform shortly before 10:40 a.m., shots were fired and there were “several casualties.” Kusse said that the motive for the attack remained under investigation by the FBI but that the Pentagon was secure and authorities were not seeking additional suspects. He said more details would be released “as soon as possible.”

Later Tuesday, the agency announced that the officer had died.

Defense Secretary Lloyd Austin issued condolences in a statement after the agency’s announcement. He ordered flags at the Pentagon to half-staff to honor the officer. “This fallen officer died in the line of duty, helping protect the tens of thousands of people who work in — and who visit — the Pentagon on a daily basis,” Austin said. “He and his fellow officers are members of the Pentagon family, and known to us all as professional, skilled and brave.”

Gen. Mark A. Milley, the chairman of the Joint Chiefs of Staff, said on Tuesday night that the officer’s bravery will always be honored. “We are forever grateful for the professionalism, dedication and courage he and every officer exhibit to ensure the safety and well-being of all of us who serve at the Pentagon,” Milley said.

Other officials and police departments also offered condolences. Sen. Mark R. Warner (D-Va.) tweeted Tuesday that he was saddened to hear about the “passing of a Pentagon police officer, who was killed earlier this morning in a senseless act of violence outside the Pentagon.”

Earlier in the afternoon in the District, a motorcade with dozens of D.C. police officers and a U.S. Secret Service car followed a black SUV with flashing lights, paying tribute to the fallen officer.

As the events unfolded outside the Pentagon, the Arlington Fire Department tweeted that it was responding to violence near the Pentagon Metro station and that it had encountered multiple patients.

One law enforcement official said that the officer had been stabbed during an altercation but that the cause of his death was unclear.

An Associated Press reporter near the Pentagon heard multiple gunshots, then a pause, then at least one additional shot, according to the news service. Another Associated Press journalist heard police yelling “shooter,” the news outlet reported.

Dave Statter, a journalist who lives in an apartment in Crystal City near the Pentagon, said he and his wife heard gunshots at 10:38 a.m. “It was obvious they were gunshots, in two volleys,” Statter said.

“I looked out my window from Crystal City and could see Pentagon Force Protection officers all converging on the upper level of the transit center” at the Pentagon, near the entrance to the Pentagon Metro stop. “As I looked closer and zoomed in with my camera, I could see there was a body on the ground next to a Metrobus in the roadway. And some officers were around this person offering assistance. Then I realized there was a second person to the right. At one point, I saw police doing CPR on both of them,” Statter said.

Statter posted several videos on Twitter after he watched the scene unfold. He said it was about 15 minutes before Arlington police arrived, followed shortly by Arlington emergency rescue personnel.

“I could see them take one person away in an ambulance,” Statter said. “Then I saw them take somebody else away, a third person, who seemed to come from inside or under cover in the Metro station.”

The Pentagon police tweeted shortly after 11 a.m. that the Pentagon had been locked down. The police tweeted about 12:15 p.m. that the facility had been reopened after the incident ended.

Pentagon police set up a perimeter at North Side Connector Road and Boundary Channel Drive near the Pentagon as TV cameras and photographers filmed police cars zooming into the Pentagon campus.

Two young women on their way out of the complex in the Pentagon south parking lot Tuesday afternoon said they had been told to shelter in place for several hours. The women, who spoke on the condition of anonymity because they are Pentagon employees, said they arrived inside the building about 10 a.m.

FBI officials also said little about the investigation.

“At this time, it would be premature to speculate on motive, and in order to protect the integrity of the investigation we cannot provide additional details at this time,” the bureau said in a statement. “There is no ongoing threat to the public.”

The violence happened at the Pentagon Transit Center, which is on the east side of the Pentagon, and is the largest transit hub in Northern Virginia, according to the Defense Department. With a rail station and numerous bus routes passing through the hub, it is a key stop in the Washington region for commuters headed to and from the Virginia suburbs. The transit center has 13 bus bays on the upper level and 11 on the lower level, serving various regional bus lines.

The Pentagon Metrorail station is the anchor of the transit center and one of the busiest stations in Northern Virginia, serving the transit agency’s Yellow and Blue lines, and the incident disrupted service through Tuesday night.

Metro said rail service to the Pentagon station would be suspended Wednesday. Yellow and Blue Line trains will continue to bypass the station all day, and Metro buses normally scheduled to run to and from the Pentagon Transit Center will operate from outside the Pentagon City Metro station at South Hayes and 12th streets.

Metro said it sent workers to the station to help guide customers and help with travel plans and connections.

Metro said it will continue to provide updates on service at wmata.com, on Twitter @MetrorailInfo and @MetrobusInfo, and through the MetroAlerts text and email message system. Specific information on rail lines and bus routes will be issued through MetroAlerts, the agency said.

The chief executive of the Washington Metrorail Safety Commission said in a statement that his agency was looking at the incident.

“Our team is monitoring the reported shooting earlier today outside the Pentagon Metro Station,” David L. Mayer said. “Although this initially appears to be primarily a security event, the [safety commission] is prepared to evaluate any aspects of the event relating to operational safety and emergency preparedness.”

Teo Armus, Emily Davies, Meagan Flynn, Dana Hedgpeth, Dan Lamothe, Dan Rosenzweig-Ziff and Clarence Williams contributed to this report.