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.

Key points: The woman alleged she was raped at gunpoint last year and named two men in her police complaint

The woman alleged she was raped at gunpoint last year and named two men in her police complaint Those two men, plus three others, have been arrested after the woman was beaten, stabbed, and set on fire on the way to her court hearing

Those two men, plus three others, have been arrested after the woman was beaten, stabbed, and set on fire on the way to her court hearing The 23-year-old died in a New Delhi hospital after suffering a cardiac arrest

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

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

The attack, the second major case of violence against women in the past two weeks, sparked public outrage in India and prompted protests from opposition leaders who blamed the ruling party for failing to check incidents of violence against women.

Alleged rapist released on bail last week

Head of burns and plastic surgery at New Delhi's Safdarjung Hospital Dr Shalabh Kumar said the woman died on Friday after suffering a cardiac arrest.

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

Indians during a protest demanding justice in the case of a veterinarian who was gang-raped and killed. ( AP: Bikas Das )

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

Sexual assault support services: 1800 RESPECT: 1800 737 732

1800 RESPECT: 1800 737 732 Lifeline: 131 114

Lifeline: 131 114 Beyond Blue: 1300 224 636

Beyond Blue: 1300 224 636 QLife: 1800 184 527

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

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

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 men accused have been arrested

Superintendent of Police Vikrant Vir said all five of the accused had been arrested and were in 14-day judicial custody.

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

Women attend a protest march against the alleged rape and murder of a 27-year-old woman. ( Reuters: Rupak De Chowdhuri )

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 alleged his family had 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."

A woman holds a candle and placard seeking an end to sexual violence against women. ( AP: Ajaz Rahi )

Crime in Uttar Pradesh, India's most populous state

Uttar Pradesh has become notorious for its poor record regarding crimes against women, with more than 4,200 cases of rape reported there in 2017 — the highest in the country.

Opposition leaders, including Priyanka Gandhi Vadra, general secretary of India's main opposition Congress party, accused the Uttar Pradesh government, run by Prime Minister Narendra Modi's ruling Bharatiya Janata Party, of failing to curb crimes against women.

In an earlier incident in Unnao, a young woman had accused Uttar Pradesh lawmaker Kuldeep Singh Sengar of raping her in 2017.

In July last year, the victim and her lawyer were critically injured in a highway collision when a truck hit the car in which they were travelling.

The woman's two aunts, who were also in the car, were killed in the accident.

Mr Sengar denies the rape and any involvement in the car crash.

On Friday, Indian police shot dead four men who were suspected of raping and killing a 27-year-old veterinarian near Hyderabad city.

People shout slogans in favour of police and cheer them after four men accused of raping and killing a woman in southern India were fatally shot by police. ( AP: Mahesh Kumar A. )

But many were also concerned that police had overreacted in shooting the alleged suspects without any trial.

"What will it take (to end rapes)?" asked Karuna Nundy, a lawyer practising at India's Supreme Court, who was instrumental in shaping anti-rape laws in 2013.

"Not the encounter of just the poor men who rape, but swift arrest and certain punishment of all rapists, however powerful or closely related to the victim.

"And that takes real change, it's not as easy as passing a legal amendment to increase sentencing."

Reuters