This article contains references to sexual assault.

A 23-year-old rape victim set on fire by a gang of men, which included her alleged rapists, has died in a New Delhi hospital.

The woman was on her way to board a train in Unnao district of northern Uttar Pradesh state to attend a court hearing over her rape when she was doused with kerosene and set on fire on Thursday.

She was airlifted to New Delhi for treatment later that day.

READ MORE Indian woman set on fire en-route to testify against her alleged rapists

The attack, the second major case of violence against women in the past two weeks, has sparked public outrage in India.

The woman died on Friday after suffering a cardiac arrest, Dr Shalabh Kumar, the head of burns and plastic department at New Delhi's Safdarjung Hospital told Reuters.

"She was having 95 per cent burns," he said, adding the woman's windpipe was burnt and "toxic and hot fumes" had filled her lungs.

The woman had filed a complaint with Unnao police in March alleging she had been raped at gunpoint on 12 December 2018, police documents showed.

The woman named two local men, one of them was arrested by police, the other absconded.

Having been subsequently jailed, the alleged rapist was released last week after securing bail, police officer S.K. Bhagat said in Lucknow, the capital of Uttar Pradesh state.

READ MORE Indian MP calls for men who raped and murdered vet to be publicly 'lynched'

On Thursday, the rape victim was seized by five men, including the two people she had named in her complaint, and beaten, stabbed and set on fire, local media reported citing her statement to police.

Still ablaze, she walked nearly a kilometre, seeking help before finally calling the police herself, according to Aaj Taj TV news channel.

All five of the accused have been arrested and are in 14-day judicial custody, Vikrant Vir, superintendent of police, Unnao, told Reuters.

A fast-track court would hear the case and the guilty would not be spared, Uttar Pradesh Chief Minister Yogi Adityanath said.

In India, lengthy trials, often a result of fewer courts and judges, tend to delay convictions, leaving poor, disillusioned victims with little money and patience to pursue the case.

Also, long trials result in bails to the accused who often intimidate victims and their witnesses and try tampering with evidence.

The victim's father has alleged that his family was been harassed and threatened by the family of the accused.

"We tried to seek protection as the accused and their family kept threatening my daughter and my family, but we received little help from the government," he said.

"Now, every single accused should be either hanged or shot dead."

If you or someone you know is impacted by sexual assault, family or domestic violence, call 1800RESPECT on 1800 737 732 or visit 1800RESPECT.org.au. In an emergency, call 000.