At least seven people are reported to have been killed after a top hotel in the Afghan capital, Kabul, came under attack by gunmen and suicide bombers.
An official said three bombers had blown themselves up at the Intercontinental Hotel and another had been shot dead.
Later, Nato said two of its helicopters had killed three attackers on the roof.
Kabul's police chief told the BBC that troops had entered the hotel and that all the guests were safe.
After an operation lasting more than four hours, officials said all the attackers had been killed.
Interior ministry spokesman Siddiq Siddiqi told AFP that the seven killed were all Afghans and did not include the insurgents who died. He said eight other people had been wounded and the number of casualties could rise.
Taliban spokesman Zabiullah Mujahid said the group was behind the attack.
The Intercontinental is one of Kabul's best-known hotels and is popular with Westerners. It is situated on a hill in the west of the city.
Officials said a meeting of provincial governors taking place at the hotel might have been the reason for the attack.
The attack also came the night before the start of a conference about the transition of responsibility for security from the Nato-led International Security Assistance Force (Isaf) to Afghan security forces.
A guest at the hotel told AP news agency that the attack began when many people were having dinner in the restaurant, and that he had jumped out of a first-floor window to escape the gunmen.
"I was running with my family," said the man, named as Jawid. "There was shooting. The restaurant was full with guests."
Another guest told the BBC that there was a scene of chaos, and that they had been told to stay in their rooms and keep their doors locked.
An Afghan intelligence official said several Afghan provincial governors and the Takhar provincial council chief had also been there.
"Most of these VIPs were in a car park when at least three suicide attackers arrived and started firing their weapons," he added.
"Bodyguards for some of the governors exchanged gunfire with the attackers. The attackers had hand-grenades, rocket-propelled grenades and AK-47s.''
Later, three attackers managed to reach the roof and there was sporadic gunfire for several hours.
Afghan officials then asked Isaf for assistance, security sources told the BBC.
"Two International Security Assistance Force helicopters... engaged three individuals on the roof," Isaf spokesman Major Tim James said.
"The indications are that the three individuals on the roof have been killed."
During the earlier fighting, some bullets landed close to the house of Afghanistan's First Vice-President, Marshal Mohammad Qasim Fahim, who was evacuated.
The fifth and sixth floors of the hotel were reported to be on fire.
Kabul police chief Gen Mohammad Ayub Salangi told the BBC that security forces had searched the hotel and all of the guests were safe.
"Our boys have shot dead one of the suicide attackers. We are trying to defuse his [explosive] vest,'' he said.
Afghan President Hamid Karzai was being kept informed of the operation, officials said.
Correspondents say the Intercontinental is one of Kabul's most heavily guarded hotels.
The US condemned the attack, saying it demonstrated "the terrorists' complete disregard for human life".
Kabul has been relatively stable in recent months, although violence has increased across the country since the killing of Osama Bin Laden in Pakistan on 2 May, and the start of the Taliban's "spring offensive".
In January 2008, militants stormed the capital's most popular luxury hotel, the Serena, and killed eight people, including an American, a Norwegian and a Philippine woman.