An Afghani cleric and police official in Kabul Friday defended the actions of a mob who beat and immolated a woman for allegedly burning a copy of the Quran, Islam's central religious text.

The crowd in the Afghan capital was captured on video beating the 32-year-old woman to death with planks and stones as well jumping on her Thursday. A group of men then reportedly set her body ablaze and hurled it into a nearby river.

It has not yet been determined whether she actually burned a copy of the holy book.

The morning after the violence, a cleric at Wazir Akbar Khan Mosque in Kabul said during Friday prayers that the mob had a right to defend Islam.

"I am warning the government not to arrest those who did this, because it will mean an uprising," the cleric said in a sermon broadcast on loudspeaker, according to Reuters.

His words came after authorities reportedly arrested at least four people involved in the incident, the BBC reported.

A Kabul police chief's office spokesman also reportedly posted a Facebook comment after the incident, saying the woman had insulted the religion.

"This [person] thought, like several other unbelievers, that this kind of action and insult will get them US or European citizenship," he wrote. "But before reaching their target, lost their life."

Farid Afzali, Kabul police's head of investigations, said the parents of the woman had identified her to police as 32-year-old Farkhunda, according to the LA Times. The woman's family also claimed that she had not meant to burn pages of the Quran and that she was mentally ill.

In the video, a large mob of men can be seen gathered around the woman, while several are filmed kicking and stomping on her. Some members of the mob then throw rocks at her and hit her with planks, while others film the attack.

After beating the woman to death, the men allegedly threw her body onto the riverbed and set her on fire, according to the BBC.

Afghani police reportedly tried to stop the crowd from attacking the woman, but they "reacted too late" and their efforts were futile, Afzali told the BBC.

Shah Jahan, a shopkeeper who witnessed the scene, told the LA Times the crowd, "broke the railing above the shrine itself, that's how strong they were. You couldn't see past the people."

Afghani President Ashraf Ghani Thursday condemned the attack and called for a joint investigation into the incident, which he said will be overseen by the country's interior ministry, the leadership of the mosque, and the Ulama Council, which handles religious issues.

"No-one has the right to take it upon themselves to act as judge and court, nor to commit violence against anyone for any reason," Ghani said in a statement.

Patti Gossman, a senior researcher on Afghanistan at Human Rights Watch, told VICE News Friday that it is imperative that perpetrators in the incident are prosecuted to deter further attacks of this kind.

The Afghan president needs to ensure "that the police respond promptly to protect victims," she wrote in an email. "We are concerned that this was not the case in this incident."

Desecration of the Quran previously led to violence in Afghanistan in 2011, when an American preacher broadcast footage of himself on the Internet burning an Islamic holy book. The move incited a mob to storm the UN headquarters in the northern city of Mazar-i-Sharif, resulting in the death of seven UN staffers and five demonstrators.