About 2,000 Afghans protested outside the main US military base in Afghanistan over a report that foreign soldiers improperly disposed of copies of the Koran.
US helicopters fired flares to try to break up as many as 2,000 demonstrators who massed outside several gates to the base, chanting anti-foreigner slogans and throwing stones.
Roshna Khalid, the provincial governor's spokeswoman, said copies of the Muslim holy book had been burnt inside Bagram airbase, an hour's drive north of Kabul, citing accounts from local labourers.
"The labourers normally take the garbage outside and they found the remains of Korans," Mr Khalid said.
NATO's top general in Afghanistan attempted to contain fury over the incident.
"When we learned of these actions, we immediately intervened and stopped them. The materials recovered will be properly handled by appropriate religious authorities," said General John Allen, head of the International Security Assistance Force (ISAF), in a written statement, as well as in a video released on a US military website.
"I offer my sincere apologies for any offence this may have caused, to the president of Afghanistan, the government of the Islamic Republic of Afghanistan, and most importantly, to the noble people of Afghanistan," said Mr Allen.
"This was not intentional in any way."
The apology did little to ease anger. The Koran is the holy book of Islam and any hint that Western forces are showing it disrespect could deepen resentment over their presence in Afghanistan.
"We Afghans don't want these Christians and infidels, they are the enemy of our soil, our honor and our Koran," said Haji Shirin, one of the protesters.
"I urge all Muslims to sacrifice themselves in order to pull out these troops from this soil."
Bagram also houses a prison for Afghans detained by US forces.
The centre has caused resentment among Afghans because of reports of torture and ill-treatment of suspected Taliban prisoners, with President Hamid Karzai demanding the transfer of prisoners to Afghan security.