Media playback is unsupported on your device Media caption Guests tried to escape by using bed sheets to climb down from balconies

An overnight siege of a luxury hotel by gunmen in the Afghan capital has come to an end, security forces say.

Six civilians, including a foreign woman, died at the Intercontinental Hotel in Kabul, along with three attackers, the interior ministry said.

Some 160 people were rescued after Afghan troops fought through the night to regain control of the building.

Some reports suggested gunfire had continued for some time after the authorities declared the siege over.

Afghan news agency Tolo says the death toll could be higher than the official figure, quoting a reporter who said they had seen dozens of bodies inside the hotel.

Afghan airline Kam Air told local journalist Bilal Sarwary it had 42 members of staff in the hotel, some of whom are foreign nationals; 18 are still missing with five feared dead.

The Taliban, which targeted the hotel in 2011, says it was behind the latest attack. A spokesman said in a statement quoted by AFP that the group had "killed tens of foreign invaders and their puppets".

Chaos and desperation

The gunmen burst into the six-floor hotel at around 21:00 local time (16:30 GMT) on Saturday evening, as guests were enjoying dinner.

Afghan Telecom regional director Aziz Tayeb, who was one of dozens of guests due to attend an IT conference at the hotel on Sunday, said he saw the attackers arrive as he was heading towards the exit.

"Everything became chaotic in a moment," he told the AFP news agency. "I hid behind a pillar and I saw people who were enjoying themselves a second ago screaming and fleeing like crazy, and some of them falling down, hit by bullets."

The gunmen - armed with rocket-propelled grenades as well as smaller weapons - stormed through the hotel taking many of the guests hostage.

"They were shouting... 'Don't leave any of them alive, good or bad. Shoot and kill them all," another guest, Abdul Rahman Naseri, said.

Several guests were pictured using bed sheets to try to climb down from a top-floor balcony.

One of them, Mohammad Musa, said his roommate suggested they escape that way after a fire broke out on their floor. "I tried to come down but I was heavy and my arms were not strong enough," he said. "I fell down and injured my shoulder and leg."

Dramatic images on Afghan TV showed thick black smoke and flames rising from the imposing hilltop hotel.

Image copyright AFP Image caption The hotel is a landmark in Kabul

Image copyright Reuters Image caption Several ambulances were on hand to transport the wounded to hospital

Afghan special forces were lowered by helicopters on to the roof of the hotel during the night, an interior ministry spokesman said.

They were working with Western special forces to bring the siege to an end.

Forty-one foreigners were among those rescued and seven people were wounded, according to figures from the interior ministry.

The ministry has promised an investigation into how the attackers breached security, which was handed to a private company two weeks ago.

Hotel manager Ahmad Haris Nayab said the gunmen had entered the hotel through a kitchen.

US warning

Saturday's siege comes just days after the US embassy in Kabul issued a warning about hotels in the city.

"We are aware of reports that extremist groups may be planning an attack against hotels in Kabul," the embassy wrote in a public security alert published Thursday, though it highlighted another hotel near the international airport as a possible target.

"These groups may also be targeting public gatherings/demonstrations, government facilities, transportation, markets, and places where foreigners are known to congregate."

The Intercontinental is a state-owned hotel - not linked to the global hotel chain of the same name - which often hosts weddings, conferences and political gatherings.

Security has been tightened in Kabul since last May, when a huge truck bomb killed at least 150 people.

However, there have been several attacks in recent months. They include a bomb at a Shia cultural centre last month that killed more than 40 people.

Are you in the area? If it is safe to do so, you can share your experiences by emailing haveyoursay@bbc.co.uk.

Please include a contact number if you are willing to speak to a BBC journalist. You can also contact us in the following ways: