Media playback is unsupported on your device Media caption BBC's Orla Guerin: "Apologies from US officials are not cooling anger on the streets of Afghanistan"

Thousands of enraged Afghans have taken to the streets for a fourth day, after US soldiers inadvertently set fire to copies of the Koran.

In the deadliest day of unrest so far, at least 12 people died across the country, as mobs charged at US bases and diplomatic missions.

More than 20 people have been killed since the unrest began, including two US soldiers who died on Thursday.

President Barack Obama has apologised for the Koran-burning incident.

In a letter to his Afghan counterpart Hamid Karzai, Mr Obama said the books had been "unintentionally mishandled".

US personnel apparently put the books into a rubbish incinerator at Bagram air base, near Kabul.

Spreading unrest

Most of the deaths reported on Friday were in western Herat province, which had seen little unrest previously.

Analysis After the anger expressed in the Afghan parliament on Wednesday, where mullahs were prompted to encourage demonstrations, it was certain that protests would last until Friday. The fact that crowds targeted police stations shows how frustrations were driven not just by Koran burnings but also by issues such as such insecurity, poor governance, corruption and unemployment. Afghan forces, particularly the intelligence agency, clearly need to improve their performance as they failed for a second day to identify groups and individuals wanting to take advantage of the chaos. Some protesters in Kabul were armed and managed to open fire on the police. It seems likely that protests will fizzle out on Saturday, unless there is appetite in the establishment for more anger to be vented. But it will take the US a long time to repair its image, and this may prove a costly mistake in the campaign to win hearts and minds.

A group of demonstrators tried to attack the US consulate in Herat city, burning police vehicles and leaving several officers injured.

Hospital officials confirmed four people had been killed, but it was unclear how they had died.

Another four people died near the town of Adraskan, 70km (45 miles) south of Herat city.

Elsewhere in Afghanistan:

About 1,000 people took to the streets of Baghlan, north of Kabul, and one person was reported killed

In Kabul, hundreds of people poured on to the streets to take part in several rallies after Friday prayers; police said a protester was shot and killed accidentally when other demonstrators opened fire

Two demonstrators were killed in Khost province

Several thousand people protesting in Nangarhar blocked a main road

Reports say isolated protests have also broken out in Pakistan, where there is a tradition of angry anti-US rallies.

'Major error'

Earlier on Friday, Nato commander in Afghanistan, Gen John Allen, appealed for calm.

Media playback is unsupported on your device Media caption Nato Gen John Allen: "American soldiers do not stand for this"

"I call on everyone throughout the country - Isaf members and Afghans - to exercise patience and restraint as we continue to gather the facts," Gen Allen said in a statement.

"Working together with the Afghan leadership is the only way for us to correct this major error and ensure that it never happens again."

Muslims consider the Koran the literal word of God and treat each book with deep reverence.

And the various apologies from Nato and the US have not cooled the anger on the streets, says the BBC's Orla Guerin in Kabul.

On Thursday the Taliban had called on Afghans to attack "invading forces" in revenge for "insulting" the Koran.

Last year, at least 24 people died in protests across Afghanistan after a hard-line US pastor burned a Koran in Florida.