Kamel Khan, 32, a businessman, was chatting with two friends on the poolside terrace of the hilltop Intercontinental Hotel on Tuesday night when he heard a burst of gunfire and looked up. A man carrying a machine gun, with an ammunition belt across his chest and a knapsack on his back, was standing a few feet away.

“He stared at all of the guests like he wanted to kill us, and he had enough bullets to do it, but for some reason he just turned and kept going,” Khan said. After a moment of shock, Khan and dozens of other guests made a dash for the garden wall and fled downhill, while heavy shooting erupted behind them.

About the same time, Maulvi Mohammed Orsaji, head of the Takhar Provincial Council, was dining with a judge in the hotel’s formal dining room when several other gunmen entered and started shooting. Both officials were visiting Kabul for a governors’ conference that was scheduled for Thursday and Friday.

“I got down and hid behind a pillar, and I stayed there for the next five hours,” the shaken elderly cleric recounted Wednesday morning. “There was shooting and explosions. By the time it was over, both my guard and my friend, the judge, were dead.”

“I was a fighter in the [anti-Soviet] jihad when I was young,” Orsaji said. “But I never saw such a wild kind of attack in my life.”

The siege of the Intercontinental by a squad of Taliban suicide bombers and heavily armed gunmen was one of the most sophisticated and audacious attacks in the Afghan capital in years. It took the lives of 11 civilians, including hotel staff and visitors, and wounded a dozen more, officials said.

Eight assailants were killed, officials said. Some are thought to have blown themselves up as part of the attack, while others were shot inside the hotel or on its grounds. The last two assailants were killed by NATO helicopter gunships on the roof shortly before dawn, officials said.

The national intelligence police said no foreigners were among the civilian dead, but other officials offered conflicting information. The Interior Ministry said a Spaniard was slain, and police officials said a pilot from Turkey and a visitor from France had been killed.

The U.S. Embassy said that a number of Americans had been dining or staying at the hotel but that all were accounted for. The Canadian Embassy said reports of a Canadian diplomat’s death were untrue.

The assault shattered all semblance of security in Kabul at a critical time. President Obama recently announced a gradual withdrawal of 33,000 U.S. troops from Afghanistan, and the government of President Hamid Karzai is preparing to assume full responsibility for security by 2014.

Kabul is one of seven cities or regions slated for an early transition to Afghan defense leadership, beginning next month. Officials said the Taliban attack was clearly intended to sabotage the transition and prove that Afghan forces cannot protect the general population, but they vowed not to allow the insurgents to derail the turnover.

“The enemy failed to carry out their plan because they were all killed and there was no major cost to civilian life,” Lutfullah Mashal, spokesman for the national intelligence police, said in a news conference. “They want to undermine things in the seven areas of transition. . . . We say to them that we Afghans have the ability to stop terrorist attacks and we will.”

Nevertheless, Mashal and other officials were at a loss to explain how at least eight men, toting a sizable military arsenal, were able to reach the heavily guarded hotel, explode a truck outside the entrance and rampage through the dining halls and reception areas for most of the night, shooting people at random while security forces attempted to quell the attack.

He said the attackers might have prepared and possibly stored weapons in the area by posing as construction workers or hotel staff members.

Intelligence officials laid out a display of items recovered from the assailants, including a suicide vest packed with explosives, burned sneakers, grenades and rocket launchers, and a variety of Afghan identity cards.

A Taliban spokesman, in a news statement Wednesday afternoon, named seven Afghan “freedom fighters” from Konar, Khost, Kunduz, Paktia, Wardak and Zabul provinces as the attackers.

He said that the assailants had killed 90 people — many times the official estimates by Afghan authorities — and that the assault had been planned carefully to disrupt the governors’ conference, sabotage the security transition and deny foreign intelligence officers a secure place to stay in the capital.

Early Wednesday, with the hotel cleared of attackers and its roof charred black from explosions and rockets, emergency workers evacuated the last of the wounded and described scenes of panic and chaos as the siege erupted.

“I saw a foreigner dead near his computer. I saw an Afghan official throwing himself from a window,” said Ahmad Fahim, a police officer.

But the scheduled governors’ conference proceeded as planned in a government hall. Ashraf Ghani, a senior minister leading the conference, said at the opening session that attacks would not deter the government from its plans.

“The transition process will be implemented under any form,” Ghani said. “Our enemies should know that they cannot disrupt this process. We will spare no sacrifice, and this will not change our resolve.”

Outside the hotel, where police had blocked the steep driveway to all visitors and traffic, some employees gathered and spoke of their co-workers — including a cook and a guard — who died in the assault.

Naim Rasool, 22, a butcher on the hotel kitchen staff, said he lost three of his friends.

Ahmad Jan, a driver for a cement contractor who was dining at the hotel Tuesday night, may have been the first person to spot the attackers. He was waiting in the parking lot when two men with assault rifles appeared and opened fire on the guards at the front entrance.

“They just killed them and kept going,” Jan said. “There were a lot of private bodyguards waiting outside, and some of them also opened fire. It was hard to know who was who.

“Then I looked up and saw people jumping from windows. When they landed, some of them broke their hands.”

Special correspondent Sayed Salahuddin contributed to this report.