Sixteen Bangladeshis have been sentenced to death for the murder of a 19-year-old student, Nusrat Jahan Rafi, who was burned to death in April after complaining of being sexually harassed by her school principal.

Among those found guilty were former members of the school’s administration, teachers and pupils – 12 of the 16 having confessed to participating in the killing in which Rafi was lured on to the school’s roof, doused in paraffin and set alight.

The case was heard at the women and children repression prevention tribunal in Feni, where the judge, Mamunur Rashid, delivered the verdicts to a packed, chaotic courtroom after a fast-tracked trial.

The death sentences will be sent to the country’s high court for confirmation and are likely to be appealed.

Rafi was targeted after refusing to withdraw an allegation that she had been sexually harassed by the headteacher.

Speaking after the verdict was announced, the prosecutor, Hafez Ahmed, said: “The verdict proves that nobody will get away with murder in Bangladesh. We have the rule of law.”

Local media reported that police were deployed in and around Rafi’s home for the security of the family members amid fears of reprisals.

Rafi had been a student at the Sonagazi Senior Fazil Madrasa when she complained of being harassed by Siraj ud-Daula, on 27 March. After she first went to the police to report the sexual harassment a video was leaked showing a police chief registering her complaint but dismissing it as “not a big deal”.

Despite this, the headteacher was arrested and sent to jail, while his family pressured Rafi’s family to drop the complaint.

The prosecution alleged he had issued orders from from his jail cell to accomplices – including two local ruling Awami League party leaders and several seminary students – to kill the student if she did not retract her complaint.

According to the evidence, after Rafi arrived at the school to take an exam, a classmate named Poppy lured her to a rooftop, where five others – including three of her classmates – tied her hands and feet with a scarf before setting her on fire.

The conspirators had hoped to pass off the incident as suicide by self immolation, but the plan fell through after flames burned through the scarf binding her and she was able to get down from the roof for help. Her brother recorded a video statement from her in the ambulance on a mobile phone.

Having sustained 80% burns, Rafi died five days later, having been moved to a hospital in Dhaka in a case that prompted national outrage amid an alarming rise in sexual harassment cases.

Sheikh Hasina, the prime minister, promised to prosecute all those involved.

Before the verdict, Rafi’s brother Mahmudul Hasan Noman had called for the death penalty. “I hope that the convicts receive maximum punishment in the case as they have already given confessional statement,” he said.

Activists said the murder exposed a culture of impunity around sexual crimes against women and children, and the risks of reporting harassment. Despite the passage of a Suppression of Violence Against Women and Children Act in 2000, violence against women remains a substantial problem.

Prosecutions are rare in cases of rape and sexual assault. After the killing, Bangladesh ordered 27,000 schools to set up committees to prevent sexual violence.

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

“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.”