Video footage has emerged showing a Bangladeshi teen being forced to tearfully recount allegations of rape to police shortly before she was burned to death.

Nusrat Jahan Rafi, 19, was filmed by officers after she went to a police station to accuse headmaster SM Siraj-ud-Daula of touching her inappropriately last month.

The video was then leaked online, sparking a backlash against Rafi and her family that ended with her being set alight by a gang of burqa-clad students at her school.

She suffered 80 per cent burns to her body and died in hospital four days later, but not before recounting what had happened.

Her death sparked public outcry and police have since arrested 17 people, one of who has told them the attack was ordered by the headmaster himself.

Meanwhile teachers at the school said Siraj-ud-Daula has a history of sexually harassing students, some of whom reported the alleged crimes only to be ignored.

Nusrat Jahan Rafi, 19, was forced to tearfully recount her rape ordeal to police in Bangladesh before the tape was leaked to local media, sparking a backlash that ended with her death

Rafi suffered burns to 80 per cent of her body during an attack by fellow students after accusing the headmaster of her school of rape

Following mass protests police have arrested 17 people and say one of them has confessed that the headmaster ordered the attack himself

One staff member, speaking anonymously to the Dhaka Tribune, said the headmaster sexually assaulted a female student in October last year.

The student complained and was backed by three teachers who demanded action, but no police investigation was launched and the teachers were instead sanction for speaking out against their boss.

He was also expelled from a political party because of 'a number of allegations against him', the Tribune reports.

After being taken in by another party, the paper accuses him of using his influence to stifle police investigations into his conduct and drum up support for his tenure at the school.

Following Rafi's allegations, police say that Siraj-ud-Daula instructed her attackers 'to put pressure on he to withdraw the case or kill her if she refused'.

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

Principal Siraj-ud-Daula, who has been arrested and accused of ordering the killing

When she begins crying he adds: 'Stop crying, nothing happened that you have to cry.'

But officers did not arrest or question the man, and instead the video found its way into local media.

According to Rafi's confession, the attack began when the headmaster of her madrassa, or Islamic school, called her into his office.

She claimed the man, named locally as Siraj-ud-Daula, repeatedly touched her inappropriately and that she fled, before going to the police station the same day.

For more than a week, Rafi avoided going back to the school while male pupils organised a rally for the teacher, but on April 6 she had to attend an Arabic exam.

Fearing for her safety, she tried to take her brother along for protection but he was barred from entering the building.

A short while later Rafi was lured to the roof on the pretext that one of her friends was being beaten up there.

Instead, she was confronted by a group of four or five people wearing burqas who demanded that she drop her complaint against the headmaster.

When she refused, the group held her down, poured kerosene over her and set her alight before fleeing.

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.

Police chief Moazzem Hossain filmed the video of Rafi's allegations and can be heard questioning her. He has since been removed from his post

The teenager's death provoked a fierce backlash among locals who took to the streets in protest, with Prime Minister Sheikh Hasina vowing action will be taken

'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.

While being taken to hospital in an ambulance, Rafi used her brother's mobile phone to record a video about her attack in which she named some of the people she believed were responsible.

'The teacher touched me, I will fight this crime till my last breath,' she said.

Doctors found she had suffered burns to 80 per cent of her body, and despite their efforts to treat her, she died four days later in hospital.

News of the murder has sparked a fierce backlash among locals and drawn protesters on to the streets demanding justice.

Prime Minister Sheikh Hasina met Nusrat's family in Dhaka and promised that 'none of the culprits will be spared from legal action.'

In a video recorded after the attack, Rafi said four or five people wearing burqas lured her to the school's roof, threw kerosene on her, and set her alight (pictured, protests in Bangladesh)

A group of people staged a demonstration in Sylhet, Bangladesh demanding justice for Rafi

Daula remains in police custody where he has been held since the alleged attack. Hossain was dismissed from his post and reassigned to another station.

Rafi's father, Musa Manik, said: 'We are satisfied with the progress of the investigation, but a speedy trial is a must.'

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,' 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.