A 23-year-old rape victim who was set on fire by a gang of men, which included her alleged rapist, has died in a New Delhi hospital, the doctor treating her said.

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

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, said Dr Shalabh Kumar, head of the burns and plastic department at New Delhi’s Safdarjung hospital. “She was having 95% burns,” he said, adding that “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.

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

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.

On Friday, Indian police shot dead four men who were suspected of raping and killing a 27-year-old veterinarian near Hyderabad city. The shooting – which police claimed happened because they tried to escape – drew applause from some quarters but many were also concerned that the lack of clarity around the incident was indicative of an extrajudicial police killing.