Authorities are investigating the death of a Moroccan teenager who set herself on fire after a group of people accused of gang raping her, threatened to release pictures of the attack online.

“Eight young men” abducted the then 16-year-old girl from Ben Guerir, north of Marrakech, last year and “took it in turns to rape her”, according to the Moroccan Association of Human Rights (AMDH).

Seven suspects were arrested in connection with the incident and were referred to the prosecutor for questioning. An eighth suspect was later arrested, the group told AFP.

The prosecutor later granted the suspects a provisional release and after being freed they threatened the victim, saying they would publish images of the rape, taken with mobile phones, unless the charges against them were dropped, the MAHR says.

“This is the reason why last Friday [29 July] she set herself on fire,” said the head of AMDH Marrakech, Omar Arbib.

The 17-year-old covered herself in a flammable substance and set herself on fire in a street in Ben Guerir, the Mail Online reports.

The girl suffered three-degree burns and died the next day in hospital.

Following her death, the prosecutor ordered the re-arrest of six of the eight suspects who were detained, Mr Arbib said.

The countries with anti-women laws Show all 5 1 /5 The countries with anti-women laws The countries with anti-women laws The countries with anti-women laws The countries with anti-women laws The countries with anti-women laws The countries with anti-women laws

It is not yet clear why the other two suspects were not re-arrested.

In 2014, Morocco’s parliament amended an article of the penal code that allowed the rapists of underage girls to avoid prosecution by marrying their victims.

The issue came to public attention when 16-year-old Amina Filali killed herself by swallowing rat poison in 2012 after being forced to marry her rapist.

The case shocked people in Morocco and received extensive media coverage around the world. It also sparked many protests against Article 475 of the Moroccan penal code, allowing the "kidnapper" of a minor to marry his victim to escape prosecution.