An Afghan woman who was beaten to death by a mob for allegedly burning a copy of the Quran has been buried in Kabul, her coffin carried aloft by women's rights activists in a rare protest in a male-dominated society.

Hundreds of people, shouting "Allah o Akbar" (God is greatest), demanded the government bring the killers of woman, known as Farkhunda, to justice. 

The 27-year-old was killed late on Thursday by a mob of mostly men who beat her, set her body on fire and then threw it into the Kabul River, according to police accounts.

The lynching, in full view of several police officers, sparked widespread condemnation at home and worldwide.

General Farid Afzali, the head of the police criminal investigation department, told the AFP news agency the woman had been undergoing psychiatric treatment for the past four years

Farkhunda's father told the media his daughter had a diploma in Islamic studies and could recite the Quran by heart. He insisted she was not involved in burning the Muslim holy book.

The woman's brother Najeebullah Malikzada supported his father's remarks.

"Farkhunda was a deeply religious girl. She used to recite the holy Quran and pray five times a day."

Bari Salam, a human rights activist, said: "This is a crime against this family, a crime against a sister and a crime against humanity.

"All those involved and all those who supported her killing should be brought to justice."

'Heinous' act

President Ashraf Ghani has condemned the killing as "heinous" and ordered a commission to investigate the incident.

He said police, who play a crucial part in the war against Taliban fighters, were not well-trained to contain such incidents.

"Almost 90 per cent of the duties of the police today are focused on fighting, which is not their constitutional role, it is not their legal role," Ghani told reporters on Saturday.

"Focusing on civilian capabilities, on enforcement of the rule of law, is key to us."

Police said they had arrested 21 people, including eight policemen.

"I will question the police ... we have started our inquiry. Even If I get killed, I won't let any of her perpetrators get away with it," said General Zahir Zahir, the head of criminal investigation at the interior ministry.

Source: Agencies