Nine people have been killed and 81 injured in the Afghan city of Kandahar during a demonstration against the burning of a Qur'an by Christian extremists in the US.

Violence erupted as hundreds of demonstrators marched through Kandahar a day after seven foreigners were killed when an angry mob stormed a United Nations compound in the northern city of Mazar-e Sharif. Hundreds of people took part in the protest. Gunfire was heard and cars were set on fire.

In a statement, the Kandahar governor's office claims demonstrators were incited by the Taliban. Authorities say 17 people, including seven armed men, have been arrested.

But the Taliban have rejected the accusation. "The Taliban had nothing to do with this, it was a pure act of responsible Muslims," spokesman Zabiullah Mujahid told Reuters.

The UN mission in Afghanistan has been plunged into jeopardy after the violent protest in Mazar-e Sharif.

Four of the seven foreigners killed were former Gurkhas working as private security guards. Norway's defence ministry named another victim as Lieutenant Colonel Siki Skare, a 53-year-old female pilot working for the UN, while the sixth victim was named as Joakin Dungel, 33, a Swede working in the UN office. The seventh foreigner killed was believed to be Romanian. Two of the UN workers were reported to have been beheaded Last night, Afghan officials arrested more than 20 people in connection with the assault, including the alleged ringleader.

Under UN rules, officials will have to consider pulling out staff members or shutting down operations altogether.

Last night, Staffan de Mistura, the UN's leading envoy in Afghanistan, flew directly to Mazar-e-Sharif to take stock of the disaster. One senior staff member said there had been "absolutely no discussion" about repositioning staff, but many UN workers feared the incident would mark another milestone in the gradual retreat of UN diplomats and aid workers into a world where they only see the inside of fortified compounds and armoured vehicles.

Last week Hamid Karzai, the Afghan president, said Mazar-e-Sharif would be one of the first areas to be transferred to Afghan control this year. But the police were no match for the sudden outburst of violence yesterday, which was triggered by the actions of a fringe Christian group on the other side of the world.

The Rev Terry Jones's small church, the Dove World Outreach Centre in Florida, had threatened to destroy a copy of the Qur'an on the anniversary of the 11 September attacks last year, but the pastor backed down after an appeal by General David Petraeus, the commander of the US forces in Afghanistan. But the church went through with the burning last month with Jones in attendance.

The Qur'an burning was the subject of anger at Friday prayers around Afghanistan yesterday. In Mazar-e-Sharif thousands of people poured out of the city's famous Blue Mosque after a sermon by the presiding mullah, with one police official estimating that there were 4,000 people on the streets of the city.