By Hamid Shalizi and Jessica Donati

KABUL (Reuters) - An Afghan cleric and a police official on Friday defended the lynching of a woman in central Kabul after a mob was filmed stamping on the woman and smashing a brick on her head after she was accused of burning a Koran, Islam's holy book.

The woman's body was set on fire and thrown onto the banks of Kabul's main river on Thursday.

It was unclear whether she had actually burned a Koran, but during Friday prayers at a mosque in a smart area of Kabul, a cleric's sermon broadcast by loudspeaker told devotees that the crowd had a right to defend their Muslim beliefs at all costs.

"I am warning the government not to arrest those who did this, because it will mean an uprising," said the cleric at the Wazir Akbar Khan mosque.

Another Afghan man boasted on Facebook of participating in the lynching, saying that "pious people of Kabul, including myself, killed her and then burnt her. Her place is in hell."

A spokesman in the Kabul police chief's office also appeared to justify the killing, saying the woman had deliberately insulted Islam.

"This (person) thought, like several other unbelievers, that this kind of action and insult will get them U.S. or European citizenship. But before reaching their target, lost their life," Hashmat Stanekzai wrote on his Facebook page.

President Ashraf Ghani's office said the killing would be investigated by both the Ministry of Interior and a committee of religious scholars.

"No individual is allowed to make oneself a judge and use violence to punish others," Ghani's statement said.

It added that the government "also condemns in strong terms any action that causes disrespect to the Holy Koran and Islamic values".

Anger among Afghans over Koran desecration has boiled over into violence several times. In 2011, riots killed seven U.N. staff after an American pastor broadcast a video of himself burning a Koran.

Foreign donors that have poured billions of dollars into promoting the rule of law and human rights programs did not issue statements on the killing, which took place just a short drive from the diplomatic quarter.

Story continues

Heather Barr of Human Rights Watch urged foreign embassies, which often swiftly condemn violence linked to the Taliban, to publicly denounce the attack, to "make it clear that this kind of complete lack of rule of law represents a shocking failure".

The United Nations mission in Kabul late on Friday condemned the killing "in the strongest terms".

(Writing by Jessica Donati; Editing by Kay Johnson and Kevin Liffey)