Media playback is unsupported on your device Media caption It is not the first time that a guesthouse popular with foreigners and the city's elite has been targeted - Elizabeth Glinka reports

Four gunmen have been killed after trying to storm a guesthouse in a diplomatic area of the Afghan capital, Kabul, police say.

The attack resulted in an overnight gun battle in the Wazir Akbar Khan district, home to several embassies and official buildings.

The Taliban says it launched the attack. It lasted at least six hours.

The assailants were armed with a rocket propelled grenade launcher and other weapons, the interior ministry said.

No civilian or military casualties were reported.

"Four attackers who had one RPG launcher, three AK-47s and one grenade launcher were killed in Wazir Akbar Khan," deputy interior minister Mohammad Ayoub Salangi said on Twitter.

The four gunmen were killed before reaching their target, Kabul police chief Abdul Rahman Rahimi said.

Image copyright EPA Image caption As the battle progressed, police said they had surrounded the attackers

Afghanistan's interior ministry told the BBC that the target was the former Heetal guesthouse, that was attacked by the Taliban in December 2009 and is now officially known as the Rabbani Guesthouse.

It is popular with foreigners and is owned by the Rabbani family, whose members include Afghanistan's current Foreign Minister Salahuddin Rabbani, and its late former President, Burhanuddin Rabbani.

Earlier, Kabul police spokesman Ebadullah Karimi said the attackers had taken position among the trees behind the guesthouse.

The hotel manager told AFP news agency that all guests were in safe rooms and no-one was hurt.

"Heetal is very well fortified. After one or two initial explosions, our guards started firing on attackers who were unable to get inside," he said.

Correspondents say that the attackers appear to have tried to enter the hotel by firing a rocket propelled grenade at its heavy steel front gate.

Image copyright Reuters Image caption Security forces stood guard outside the guesthouse after the attack

Part of the gate was destroyed, but it was not damaged enough for the militants to get through.

The siege dragged on because police waited until daylight to identify and move in on their targets, officials said.

Security forces blocked roads and took up positions on rooftops, parking armoured personnel vehicles in the streets near the guesthouse.

The stand-off ended with a dawn round of sustained gunfire and big explosions that sent clouds of black smoke into the sky.

The attack began shortly before 23:00 (18:30 GMT). Police were later seen smashing street lights to cover their movements in the dark, the Associated Press reported.

Image copyright AP Image caption Police were said to have smashed street lights to cover their movements

The BBC's Sanjoy Majumder, in Kabul, said he had heard "sustained explosions, small arms fire and also the sound of grenades".

Reports by witnesses on social media said the fighting was close to the Tajik embassy and Street 15 in the Wazir Akbar Khan district.

While the area is popular with foreign workers and also houses government employees, it has been subject to several high-profile attacks in recent years, most notably in the Taverna du Liban restaurant last year.

In recent weeks, a new wave of attacks by the Taliban has targeted foreigners in Kabul.

Two weeks ago, 14 people were killed as they waited to attend a concert in a guesthouse in Kabul.

With the Taliban's traditional summer offensive under way, the UN says the number of civilians killed and injured across Afghanistan stands at nearly 3,000 over the first four months of the year, up 16% on the same period last year.

Are you in Kabul? Have you been affected by recent events? You can email haveyoursay@bbc.co.uk.

If you would be happy to speak further to a BBC journalist, please include a contact telephone number when emailing us your details.