Herat, Afghanistan (CNN) -- Hundreds of protesters took to the streets Saturday across Afghanistan, the fifth day of demonstrations over the burning of Qurans at a U.S. base, officials said.
Four civilians were killed and 50 injured amid protests near the United Nations office in Kunduz, said Saad Mokhtar, head of the city's health department. Twelve police officers were among the wounded.
Gulam Mohamad Farhad, the intelligence head of Kunduz, said the protesters tried to burn down the U.N. building.
The U.N.'s Afghan mission said all its staff in Kunduz and throughout the country are "unhurt." It denounced the attack on its compound, regretted the casualties and thanked Afghan police for their timely response to the violent protests.
The mission also said it understands Muslim anger over the Quran desecration.
"At the same time, we call upon those who would wish to express their legitimate religious sentiments to reject calls to violence, to exercise self-restraint and to avoid resorting to protests and demonstrations in order not to allow the enemies of peace to take advantage of the situation," the mission said in a statement.
The protests began after NATO troops recently burned Qurans at Bagram Airfield. The burnings sent throngs of protesters to the streets and military bases, some chanting, "Death to America."
A military official said the materials burned were removed from a detainee center's library because they had "extremist inscriptions" on them and there was "an appearance that these documents were being used to facilitate extremist communications."
American officials, including President Barack Obama, apologized and said burning them was an unintentional error, but protests raged on nonetheless. In a letter to his Afghan counterpart, President Hamid Karzai, Obama called the act "inadvertent."
Four U.S. service members have died in Afghanistan since the outrage turned violent.
A gunman Saturday shot dead two American officers inside the Afghan interior ministry in Kabul and escaped.
A Taliban spokesman said the attack, for which the group claimed responsibility, was in response to the recent burnings. NATO and Afghan officials are investigating and have not confirmed involvement by the Islamist militant group.
The commander of U.S. forces in Afghanistan, Gen. John Allen, addressed the Quran burning issue during a visit to a military base where two U.S. soldiers were killed Thursday by a man wearing an Afghan National Army uniform. A protest over the burning of Qurans was taking place outside the base at the time of the killings.
Allen called on troops to "show the Afghan people that as bad as that act was at Bagram, it was unintentional, and Americans and ISAF soldiers do not stand for this. We stand for something greater than that."
The protests on Saturday took place in various provinces, including Laghman, Paktika, Baghlan and Nurestan, according to a spokesman for the interior ministry.
In Laghman province, at least 15 people were injured when hundreds of protesters tried to attack the governor's house and office, authorities said.
Police and soldiers intervened, with some injured in the confrontation, said Abdul Rahman Sarjang, a local police chief. Two civilians and an officer were in critical condition, Sarjang said.
But protests in most of the northern regions ended peacefully, police spokesman Lal Mohamed Ahmadzai said.
At least eight people were killed and 27 wounded in protests Friday, mostly in Herat province, according to Sediq Sediqqi, spokesman for the interior ministry.
No international coalition members have been wounded in the protests, NATO's International Security Assistance Force said.
The burning at Bagram was not the first time that damaging Qurans -- or even the threat to do so -- has provoked angry Muslim reaction.
Terry Jones, the pastor of a tiny evangelical church in Florida, announced plans to burn the Muslim holy book on the ninth anniversary of the September 11, 2001, attacks on the United States. He was persuaded not to do it at the time, but he made good on the threat six months later.
Two weeks after that, protesters in northern Afghanistan attacked a U.N compound, leaving 12 people dead. In Kandahar, three people were killed in one demonstration, and nine in another when police and stone-throwing demonstrators clashed.
"The first belief among Muslims of all types is that the Quran is the word of God," said Shainool Jiwa, of the Institute of Ismaili Studies in London. "The words themselves, the typing, takes on a level of sanctity. There is a sacredness about it."
But, she said, violent reactions to its burning are as much a sign of the times as an expression of faith.
"There is a history behind this. It's much more reflective of the times we are in, the protests and anger," she said. "This whole issue has become politicized."
CNN's Josh Levs and Richard Allen Greene contributed to this report.