Protests turned deadly at a United Nations compound in northern Afghanistan when demonstrators, angry at a Koran-burning in the United States, stormed the building.
Local officials said that some 12 people were killed, including foreigners and Afghans.
There were conflicting reports as to whether a number of the victims had been beheaded.
A UN spokesman, Dan McNorton, said that seven of the UN employees -- three international UN Assistance Mission in Afghanistan (UNAMA) staff members and four international armed security guards -- were killed in the attack in the city of Mazar-e Sharif.
McNorton said no Afghan national UNAMA staff had been killed, but the investigation into the incident was still ongoing.
General Daud Daud, commander of Afghan National Police in the north, had earlier said that a fifth security guard, all of whom he identified as Nepalese nationals, was also killed.
Officials said four or five Afghan protesters were dead, as well.
UN Secretary-General Ban Ki-moon condemned the attack as "outrageous" and "cowardly." The UN Security Council is expected to hold an emergency meeting later on April 1.
Swedish Foreign Minister Carl Bildt said in a statement that a Swedish national was among the UN staff members killed.
The Norwegian Defense Ministry said a female Norweigian pilot was also among the victims.
Romania's Foreign Ministry said preliminary information suggested a Romanian citizen was also among the dead.
Russian state television, quoting an embassy spokesman, said that the Russian chief of the UN mission in Mazar-e Sharif, Pavel Yershov, was hospitalized with injuries.
Staffan de Mistura, the UN secretary-general's special representative for Afghanistan, is now traveling to Mazar-e Sharif to "deal with the situation."
U.S. Pastor, Insurgents Blamed
The Afghan protesters said they were responding to a reported Koran burning at a small fringe church in Florida when they attacked the office.
"We are very upset that the devil America burned the Holy Koran," protester Abdul Karim told Reuters. "We call for the punishment of those who dishonored our Holy Koran."
Another protester, Bismullah Khan, said, "We are protesting because they have dishonored our religion. And we want [U.S. troops] to pull out of our country."
More than 1,000 people came out into the normally peaceful Mazar-e Sharif streets after Friday Prayers to denounce the burning of the Muslim holy book by a radical U.S. pastor earlier this month.
The pastor, Terry Jones, had caused an uproar last year after threatening to burn copies of the Koran on the anniversary of the September 11 terrorist attacks. He later promised he would not carry out the plans, but burned a copy of the Koran on March 20.
The protest in front of the UN office turned violent when protesters seized weapons from the UN guards, opened fire on the police, then stormed the building.
Ata Mohammad Noor, the governor of northern Balkh Province, said in a news conference after the assault that "insurgents" had "taken advantage" of the protests to attack the UN compound.
He said that some 20 insurgents involved in the attack had been arrested.
Police chief Rawof Taj later said that the mastermind in the attack was among those arrested. He said the person was from Kapisa Province, a hotbed of the insurgency about 400 kilometers southeast of Mazar-e Sharif.
Several hundred people also protested the reported Koran burning at several sites in Herat, a city in western Afghanistan, as well as in Kabul.
With details on the attack still being collected, world leaders expressed shock and condemnation.
In a statement, U.S. President Barack Obama said: "The brave men and women of the United Nations, including the Afghan staff, undertake their work in support of the Afghan people. Their work is essential to building a stronger Afghanistan for the benefit of all its citizens. We stress the importance of calm and urge all parties to reject violence and resolve differences through dialogue."
At the U.S. State Department, spokesman Mark Toner offered condolences to the families of those killed and said, "There's no justification for the murder of innocent people."
British Foreign Secretary William Hague called upon the Afghan government to bring the perpetrators of the attack to justice, while NATO Secretary-General Anders Fogh Rasmussen also decried the attack.
The violence in Mazar-e Sharif comes ahead of the planned July 1 transfer of security responsibility for the city to Afghan hands.
compiled from agency reports