DHAKA (AFP) - A schoolgirl was burned to death in Bangladesh on the orders of her head teacher after she reported him for sexually harassing her, police said Friday (April 19).

The death of 19-year-old Nusrat Jahan Rafi last week sparked protests across the South Asian nation, with the prime minister promising to prosecute all those involved.

Rafi was lured to the rooftop of the Islamic seminary she attended where her attackers asked her to withdraw the sexual harassment complaint she had filed with police.

When she refused, she was doused in kerosene and set on fire.

Police said Friday that one of the 17 people arrested in connection with her death had accused the school's principal of ordering the attack.

The teacher "told them to put pressure on Rafi to withdraw the case or kill her if she refused", senior police superintendent Mohammad Iqbal, who is leading the investigation, told AFP.

Rafi had gone to the police in late March to report the sexual harassment, and a leaked video shows the local police station chief registering her complaint but dismissing it as "not a big deal".

Supt Iqbal said at least five of those under arrest, including three of Rafi's classmates, had tied her up with a scarf before setting her on fire.

"The plan was to pass the incident off as a suicide. But it fell through after Rafi managed to come downstairs while on fire because the scarf burnt and freed her hands and feet," he said.

Rafi suffered burns to 80 per cent of her body and died in hospital on April 10.

But she recorded a video before her death, repeating her allegations against the principal.

"The teacher touched me, I will fight this crime till my last breath," she said. She also identified some of her attackers.

"We want the highest punishment of the killers of Nusrat who was set on fire because of protesting sexual assault.#Bangladesh #JusticeForNusrat pic.twitter.com/thW24wvrNX — মেঘ (@Megh_18) April 11, 2019

I'm furious. Just got to know about Nusrat Jahan Rafi who died after being set on fire by her madrasa principle's followers because she doesn't want to withdraw a sexual assault case against the principle. My heart is with her and her family. RIP Nusrat. #JusticeForNusrat — DSHAE (@dshae_rw) April 11, 2019

Nusrat Jahan Rafi who died after being set on fire was laid to eternal rest at her village home in Feni district of #Bangladesh . She was buried at their family graveyard following a namaz-e-janaza at Mohammad Saber Pilot High School ground around 5:50pm. #justicefornusrat pic.twitter.com/Ce123WRutC — Ali Ahmad Mabrur (@Mabrur00) April 11, 2019

The case has caused outrage in Bangladesh, with Prime Minister Sheikh Hasina vowing that "none of the culprits will be spared legal action." Rights groups say the number of rape and sexual assault cases has increased in Bangladesh because authorities have failed to prosecute attackers.

"The horrifying murder of a brave woman who sought justice shows how badly the Bangladesh government has failed victims of sexual assault," Ms Meenakshi Ganguly, South Asia director at Human Rights Watch, said in a statement.

"Nusrat Jahan Rafi's death highlights the need for the Bangladesh government to take survivors of sexual assault seriously and ensure that they can safely seek a legal remedy and be protected from retaliation," she added.