Four Taliban suicide bombers dressed as women and police attacked the main United Nations compound in western Afghanistan on Saturday, officials said, but there were no casualties among UN staff.
The attack was launched on the compound in Herat, a commercial hub and the largest city in the country's west where Taliban and other Islamist insurgents are usually less active.
It was the highest profile attack on the United Nations since 2009 and will raise questions about security in a city that NATO officials believe could be among the first to have security responsibility handed from foreign troops to Afghan forces.
"The incident is over and there are no UN casualties," said Kieran Dwyer, chief UN spokesman in Kabul.
One attacker exploded a car bomb at the gates of the compound, two more blew themselves up and a fourth was shot by police inside the compound before he could detonate his bomb, Herat governor Mohammad Dawood Saba said.
Some were dressed in all-encompassing burqas worn by many Afghan women and others were in police uniforms, police said.
Despite the presence of 150,000 foreign troops, violence from Afghanistan's war against the Taliban is at its most intense since the conflict began in 2001 when US-backed Afghan troops ousted the Islamists from power.
The conflict is weighing on US President Barack Obama and his NATO allies as foreign troop casualties mount and Washington looks to start bringing back troops from July next year and steadily hand over security to local Afghan forces.
One of Afghanistan's largest cities, with a population of about 3 million, Herat is under the regional command of Italian troops and has enjoyed relative calm compared with more restive parts of the country.
Earlier this year, NATO's regional commander said districts within Herat were ready to transfer security responsibility to local forces. TALIBAN CLAIM
No ground troops from the NATO-led International Security Assistance Force (ISAF) were involved, but an ISAF helicopter was circling overhead monitoring the incident, ISAF spokesman Major Michael Johnson said.
A local Taliban commander, Mullah Bilal, claimed responsibility for the attack on behalf of the group. One fighter had blown himself up and others had entered the compound, he said.
It was the worst attack against the United Nations since October 2009, when militants attacked a UN guesthouse in Kabul and five foreign UN staff were killed. That attack prompted the United Nations to evacuate hundreds of foreign workers.
In a report on Afghanistan in June, the UN said the organisation was still a potential target for militant attacks, and it would be cutting the size of its international staff.
Insurgents have stepped up attacks beyond their strongholds in the south and east of the country. More than 2,000 foreign troops have been killed since the war began, more than half of those in the past two years.
In southern Kandahar, a suicide bomber on a motorcycle detonated explosives inside the city, killing one civilian and wounding two others, said Zelmay Ayoubi, a spokesman for the provincial governor.