An all-night siege in an upmarket neighbourhood of Afghanistan's capital has ended with the deaths of four heavily armed attackers, an Afghan official said.

Deputy interior minister Mohammad Ayub Salangi said that weapons had been seized, including a grenade launcher, three automatic rifles and a hand grenade.

Using his official Twitter account, Mr Salangi said there were no civilian or military casualties.

The siege ended in a sustained barrage of automatic weapons fire and a series of huge explosions that resounded across the Wazir Akbar Khan district of Kabul city centre, home to many embassies and foreign firms.

Mr Salangi had said earlier that the target of the attack appeared to be a guesthouse but gave no further details.

The Taliban claimed the attack in tweets on a recognised Twitter account. They referred to the target as "belonging to the occupiers", reiterating the insurgents' message that foreign installations are specific targets in the Afghan capital.

The attack came amid intensified fighting across many parts of Afghanistan since the insurgents launched their annual warm weather offensive a month ago. A Taliban attack on a guesthouse in another part of the capital earlier this month left 14 people dead, including nine foreigners.

The United Nations has documented a record high number of civilian casualties - 974 killed and 1,963 injured - in the first four months of the year, a 16% increase over the same period last year.

The siege began with heavy explosions accompanying sporadic automatic weapon fire, and sounded to be focused on the Rabbani Guesthouse, which is favoured by foreigners as the area is in the heart of the diplomatic district and close to the airport.

Police and a paramilitary crisis response unit surrounded the area, blocked roads, took up positions on rooftops and parked armoured personnel vehicles in the streets around the guesthouse. Police officers smashed lights throughout the neighbourhood to cover their movements.

For about five hours, gunfire and explosions were sporadic, before a lull lasting more than an hour ended with a dawn volley of sustained gunfire and huge explosions that sent clouds of black smoke into the sky.

The guesthouse, once known as the Heetal Hotel, was damaged in a December 2009 suicide car bomb attack near the home of former Afghan vice president Ahmad Zia Massoud - brother of anti-Taliban fighter Ahmad Shah Massoud, who was killed in an al Qaida suicide bombing two days before the September 11 attacks in 2001. The 2009 attack killed eight people and wounded nearly 40.

The hotel is owned by the Rabbani family, who include the late Burhanuddin Rabbani, who served as president of Afghanistan from 1992 until 1996 and was assassinated in Kabul in 2011, and current foreign minister Salahuddin Rabbani.

Afghan security forces have been struggling to fend off Taliban attacks since US and Nato forces concluded their combat mission at the end of last year and the mission morphed into one of training and support. The new insurgent strategy appears to be aimed at forcing the government to spread its forces thinly across many regions of the country, to focus on security rather than developing the economy and creating jobs as it has promised to do.

Earlier in Uruzgan province, officials said that a district has been under attack by militants for the past two weeks, with district chief Abdul Karim Karimi saying that since the fighting began 12 soldiers had been killed and dozens wounded.

On Monday, militants killed at least 26 police officers and soldiers in ambushes in southern Helmand province.

Kabul's police chief General Abdul Rahman Rahimi, speaking to reporters outside the guesthouse, said: "Before reaching their target all four attackers were killed."

The attackers apparently attempted to enter the hotel by firing a rocket-propelled grenade at its heavy steel front gate. Part of the gate is burned, but it was not damaged enough to allow the militants entry. The hours of shooting seem to have marked a showdown as the militants sought cover and police waited for daylight to identify and move in on their targets.

Sign up to our free newsletters

Get the best updates straight to your inbox:
Please select at least one mailing list.

You can unsubscribe at any time by clicking the link in the footer of our emails. We use Mailchimp as our marketing platform. By subscribing, you acknowledge that your information will be transferred to Mailchimp for processing.