“Seven UNAMA employees have been killed, out of which five are Nepalese and two others are Europeans, one woman and one man,” said governor of Balkh province Atta Mohammad Noor, referring to the United Nations Assistance Mission in Afghanistan.

“There are five protesters killed and 20 others injured,” the governor told reporters on Friday.

More than 20 insurgents involved with the attack have been arrested, he added, saying the decision by protesters to go to the UN office had not been pre-planned.

Earlier, Lal Mohammad Ahmadzai, a police spokesman for the northern region, said: “Eight foreigners were killed and two were beheaded.”

Over a thousand protesters had flooded into the streets of the normally peaceful city after Friday prayers, and after two or three hours violence broke out.

A small group attacked the UN compound, throwing stones and climbing on blast barriers to try and enter.

A police source, who refused to be named, said protesters had stormed into the compound where they attacked the victims.

The chief of the mission in the city was wounded but survived.

A UN spokesman confirmed that there had been deaths of personnel at the mission in Mazar-i-Sharif but refused to give further details, saying the situation on the ground was still confusing. Staffan De Mistura, the top UN representative in Afghanistan, was heading to Mazar-i-Sharif to handle the matter personally, he added.