"Ten (UN) people have been killed by the protesters (...) All the killed are foreigners," police spokesman Lal Mohammad Ahmadzai said.
A spokesman for the UN mission in Kabul, Don McNorton, said: "We are aware of an incident in our Mazar office, we are currently working to ascertain all the facts."
The demonstrators were trying to overrun Nato bases and police facilities when they were fired on.
UN CONFIRMS 'DEATHS'
A UN spokesman confirmed that some UN personnel were killed Friday in an attack on the body's headquarters in Mazar-i-Sharif.
"We can confirm an attack on the UN mission in Afghanistan's operations center in Mazar-i-Sharif, and can confirm that there have been deaths of UN personnel," deputy spokesman Farhan Haq said.
He did not say how many people died, but police in Afghanistan said 11 people, including eight foreign UN workers, were killed Friday in an attack on the compound by demonstrators protesting the burning of the Quraan in March by a US pastor.
"The situation is still confusing and we are working to ascertain all the facts and take care of all our staff," Haq said.
He added that UN Secretary-General Ban Ki-moon's special representative in Afghanistan, Staffan De Mistura, was "on his way to Mazar-i-Sharif now to deal with the situation personally on the ground."
Protests were also held in Kabul, where riot police were on hand as demonstrators shouted slogans against the United States, Israel and Britain.
President Hamid Karzai called on the United States to bring to justice those responsible for the March 21 burning of Quraan.