It started as a typical night at a budget hotel in the Afghan capital.

Afghan bureaucrats and elites nibbled on free food in the garden as they waited to hear a local musician perform. In another section of the hotel, guests were arriving for a Western-style party, where black market alcohol would be served in what is officially a dry country. Elsewhere, consultants, humanitarians and contractors were settling into their hotel rooms for a quiet evening.

But about 8:30 p.m. on Wednesday, several gunshots rang out inside Kabul’s Park Palace hotel. And then more shots. By early Thursday, when Afghan security forces finally killed the attacker and freed scores of guests, 14 people had been slain, Kabul police reported.

The dead included at least 10 foreigners, including one American. Four Indians, two Pakistanis, an Italian, a dual British-Afghan citizen and one Kazakh were also killed. It was the gravest attack on foreigners in Kabul in more than a year, another reminder that civilians are increasingly bearing the brunt of the 13-year-old Afghan war.

In a statement, the Afghan Taliban claimed responsibility for the attack, saying it targeted the hotel because of the presence of foreigners, including Americans.

Afghan security forces arrive at the site of an attack in Kabul Wednesday. (Mohammad Ismail/Reuters)

The slain American was identified as Paula Kantor, the former director of the Afghanistan Research and Evaluation Unit, an Afghan organization that conducts studies aimed at improving Afghan life. Kantor had returned to Kabul for a few weeks on a short-term consulting contract, according to AREU.

Most of the other foreigners killed were also thought to be contractors working on development or humanitarian projects.

“These deliberate attacks on civilians are atrocities,” said Georgette Gagnon, the U.N. Assistance Mission in Afghanistan’s human rights director. “Taliban statements on avoiding civilian casualties ring hollow when we set them against the latest killings. The Taliban should abide by their commitments and immediately stop deliberately attacking civilians.”

Although authorities initially thought at least three gunmen were involved in the attack, Kabul Police Chief Abdul Rahman Rahimi said Thursday that officials now think there was only one assailant. The Taliban claimed that one militant carried out the attack.

If confirmed as the investigation progresses, the attack could signal a shift in Taliban tactics.

In many previous attacks, the Taliban sent pairs or teams of terrorists to overwhelm security guards. But some authorities say the Taliban is now trying to more quietly slip into groups of foreigners to launch surprise attacks, similar to the so-called insider attacks responsible for more than 148 coalition troop deaths since 2008, according to the Long War Journal, a Web site that tracks militant activity.

“Everyone had been expecting a big Taliban attack on Kabul to mark the launch of the spring offensive, something like a truck bomb, but that didn’t happen,” one Western diplomat, who requested anonymity because he was not authorized to talk to the media, told the Associated Press. “So they come with smaller weapons and firearms.”

Until recently, some United Nations staffers stayed at the Park Palace, a dormitory-style building often referred to as a guest house. The United Nations helped secure the hotel, placing armed guards along several sides of the building, local residents said. But the United Nations moved its staff out a few months ago, leaving a security gap, residents said.

Still, former guests say, people must pass through at least two security barriers to enter the hotel’s enclosed garden.

Several residents who live near the hotel said Thursday they do not think the gunman entered — or shot his way through — the main gate. Instead, they said, they suspect the gunman sneaked into the complex from an adjoining vacant building.

“We were sitting here, and nothing was happening, and then we were just hearing gunshots from inside,” said Fardin Andarabi, 25, who lives across the street from the hotel’s main gate.

When the firing began, Andarabi said, several Park Palace guards ran into the street, apparently thinking the gunman was outside.

Many of the guests were apparently able to lock themselves in their rooms or in the hotel’s safe room. Others escaped through windows.

Javed Kohestani, a nearby resident, said he heard one Afghan woman calling for help from a second-story window.

Kohestani said he grabbed a ladder to help her, and that he and others had to pry open the window’s metal security bars before leading the woman to safety.

“She told me she saw six dead bodies with her own eyes,” Kohestani said. “She said she had run to one of her colleagues’ rooms to see if they were okay, and one of them was shot dead, in the head.”

The carnage will likely prompt foreigners to again reassess how they live and work in the capital, the hub of relief work and other outreach.

Over the past 18 months, Taliban insurgents have attacked at least five guest houses. Those establishments are often less expensive — but less secure — than major hotels or private dwellings clustered inside heavily fortified compounds.

But even Kabul’s major four-star hotel, the Serena, has been vulnerable to attacks. In March 2014, nine people, including four foreigners, were killed when four Taliban gunmen entered the hotel with pistols hidden in their shoes.

John Sullivant, who is retired from the U.S. Air Force and now works as a New Hampshire-based security consultant, said some of the bloodshed can be attributed to landlords and hotel owners skimping on security.

“From a psychological standpoint, [a terrorist] needs to look at a property and be able to see, ‘These guys have something in place where it’s risky for me to go into,’ ” Sullivant said. “But a lot of these places are as easy to pick off as a 7-Eleven at 8 o’clock in the morning.”

Brian Murphy contributed from Washington.

Read more:

Taliban brings war to Afghan capital, threatening stability and endangering foreigners

Kabul was eerie and dangerous under the Taliban. It feels that way again.

Taliban attacks guesthouse of U.S.-based charity