The 23-year-old rape victim was on her way to catch a train in Unnao district to attend a hearing when she was doused with kerosene and set on fire, police said.
A 23-year-old rape victim was set ablaze by a gang of men, including the alleged rapist, as she made her way to court in northern India on Thursday, police said, stirring public outrage and shame over the scourge of crimes against women.
During the past week, thousands of Indians have protested in several cities following the alleged rape and murder of a 27-year-old vet near the southern city of Hyderabad.
Protesters and parliamentarians are pressing for courts to fast-track rape cases and demanding tougher penalties.
The woman attacked and burned on Thursday morning was in a critical condition, according to DS Negi, a doctor at the Civil Hospital in Lucknow, the capital of the northern state of Uttar Pradesh.
She had been on her way to catch a train in Unnao district to attend a hearing when she was doused with kerosene and set on fire, police said.
"As per the victim's statement, five people were involved in setting her on fire, including the one who was accused in the rape case," Vikrant Vir, a police superintendent in Unnao, said.
All five men have been detained, Uttar Pradesh police said in a tweet.
Police documents seen by Reuters showed the woman had filed a complaint with Unnao police in March alleging that she had been raped at gun-point on December 12, 2018.
Having been subsequently jailed, the alleged rapist was released last week after securing bail, police officer S.K. 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.
The Uttar Pradesh state government, currently controlled by Prime Minister Narendra Modi's Bharatiya Janata Party (BJP), came under fire in July from opposition groups accusing it of protecting a lawmaker accused of rape.