Indian police on Friday shot dead four gang-rape and murder suspects, prompting celebrations but also accusations that they were extrajudicial executions.

The men, who had been in custody for a week over the latest rape case to shock India, were shot in the early hours during a re-enactment of the crime organised by police in Shadnagar, outside the southern city of Hyderabad.

Activists protest against the rape and murder of a 27-year-old woman in India. Police later shod dead the four detained suspects as they re-enacted the crime
Activists protest against the rape and murder of a 27-year-old woman in India. Police later shod dead the four detained suspects as they re-enacted the crime AFP / Narinder NANU

"The police brought the accused to the crime spot as part of the investigation. The accused then started attacking the police with stones and sticks and then snatched the weapons and started firing," police commissioner V.C. Sajjanar said.

"The police warned them and asked them to surrender but they continued to fire. Then we opened fire and they were killed in the encounter," he told reporters at the scene, adding that the men had confessed to the crime during interrogation.

Television images showed the shoeless bodies of the suspects still lying in an open field on Friday afternoon, with guns in the hands of two of them.

Tens of thousands of women are raped in India each year, according to police data
Tens of thousands of women are raped in India each year, according to police data AFP / Dibyangshu SARKAR

The four men were accused of gang-raping and murdering a 27-year-old veterinary doctor before setting fire to her body underneath an isolated bridge late on November 27.

In a separate case, an Indian woman died late Friday night after being set on fire, allegedly by men she was en route to give evidence against in court for raping her, according to the PTI newswire.

The victim told police that she was attacked by a group of five men, two of whom had previously raped her, on her way to the hearing in the northern state of Uttar Pradesh.

Several hundred people flocked to the scene of the men's deaths on Friday, setting off firecrackers to celebrate and showering police with flower petals
Several hundred people flocked to the scene of the men's deaths on Friday, setting off firecrackers to celebrate and showering police with flower petals AFP / NOAH SEELAM

She died just before midnight following cardiac arrest at a hospital in New Delhi, according to a doctor cited by the newswire. PTI added that she suffered burns over 90 percent of her body.

All five suspects have been arrested and are being questioned, senior policeman Suvendra Kumar Bhagat told AFP.

The men were shot in the early morning as they tried to escape during the staged re-enactment in Hyderabad, police said
The men were shot in the early morning as they tried to escape during the staged re-enactment in Hyderabad, police said AFP / NOAH SEELAM

A huge backlog of cases in the slow Indian criminal justice means that many rape victims wait years for justice.

Celebrations in India after police shoot dead rape-murder suspects
Celebrations in India after police shoot dead rape-murder suspects AFPTV / Noah SEELAM

Police are often accused of using extrajudicial killings to bypass the legal process to cover-up botched investigations or to pacify public anger.

Several hundred people flocked to the scene of the four men's deaths on Friday, setting off firecrackers to celebrate and showering police with flower petals and hoisting them on their shoulders.

Women distributed sweets and tied Hindu ritual threads on the wrists of policemen to thank them.

People in Bangalore hold a candlelight vigil in support of sexual assault victims and against the alleged rape of a veterinary doctor, on December 6
People in Bangalore hold a candlelight vigil in support of sexual assault victims and against the alleged rape of a veterinary doctor, on December 6 AFP / Manjunath Kiran

Like in the infamous 2012 rape and murder of a woman on a Delhi bus, the case sparked widespread demonstrations and calls for swift and tough justice.

Shortly after the men's arrest, hundreds of protesters also tried to storm the police station where they were held.

At one demonstration in Delhi, some women wielded swords while one lawmaker called for the men to be "lynched" and another for rapists to be castrated.

Many social media users, including politicians, celebrities and athletes hailed their death.

"Great work #hyderabadpolice ..we salute u," top women's badminton player Saina Nehwal tweeted, while fellow badminton star P.V. Sindhu wrote that "Justice has been served!"

Cricketer Harbhajan Singh congratulated police and the state government for "showing this is how it is done(.) no one should dare doing something like this again in future".

And Rajyavardhan Rathore, a former minister and current MP from Prime Minister Narendra Modi's party wrote on Twitter: "Let all know this is the country where good will always prevail over evil".

But lawyer and activist Vrinda Grover told AFP the killings were "absolutely unacceptable".

"Instead of investigation and prosecution the state is committing murders to distract the public and avoid accountability," she said.

India's former federal minister for women and child development, Maneka Gandhi termed the incident "dangerous".

"They would have anyway got hanging for their heinous crime, but you can't just pick up guns and kill people because you want to. Because law is tardy, you can't kill people," Gandhi told reporters.

"To appease public rage over state failures against sexual assault, Indian authorities commit another violation," tweeted Meenakshi Ganguly from Human Rights Watch.

Police said a postmortem was completed Friday of the four suspects' bodies, PTI reported.

The state high court directed that a video of the procedure be delivered to a principal district judge and that the bodies be preserved until Monday evening, the newswire said.