A 23-year-old rape victim who was 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, 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, has sparked public outrage in India.

The woman had filed a complaint with Unnao police in March alleging she had been raped 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 said.

All five of the accused men have been arrested.

The victim's father has alleged that his family was being 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.

Uttar Pradesh is India's most populous state and 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.