(CNN) Four men held over a high-profile rape and murder case in India have been shot dead by police while they were in custody, an official confirmed Friday, drawing praise from the family of the victim but criticism from some lawmakers and rights groups.

The men had been arrested in connection with the gang-rape and murder of a 27-year-old veterinarian who was strangled and her body set alight in the southern city of Hyderabad, in Telangana state last week.

The woman's charred remains were found near a highway underpass on November 27, sparking nationwide outrage and protests in several major cities including Bengaluru and India's capital, New Delhi. Many of the demonstrators carried placards and chanted slogans demanding the death penalty for the suspects.

The victim has not been publicly identified due to India's laws against naming sexual assault victims.

Prakash Reddy, Deputy Commissioner of Shamshabad Police in Hyderabad, told CNN the four men were killed in "cross-fire" when police had taken them to the scene of the crime to reconstruct the attack.

Reddy said that the four suspects were aged between 20 and 26 years old. Two of the men were truck drivers and two were truck cleaners. They had been taken to the spot to reconstruct the crime between 3 a.m. and 6 a.m. Friday.

"Some of the accused snatched the weapons from the police personnel and fired at them," said Reddy. "In self-defense, the police fired at the accused."

An ambulance was called but the men were pronounced dead at the scene, he added.

No details were made available regarding the number of police at the scene during the incident, or how the four accused had managed to obtain the weapons from the officers.

Hyderabad police said they will hold a press conference later on Friday regarding the incident.

Speaking to local television on Friday, the woman's father, who has also not been named, said that the actions of the police would mean that his "daughter's soul will finally attain peace."

"I want to congratulate the government of Telangana, the police and the people who have been supporting me," he added.

A sister of the victim said she believed the incident would deter others from raping in future.

"The accused have been encountered. And I feel very happy," she said.

But others say the circumstances of the killings have raised questions over whether the police took the law into their own hands.

"If you kill them beforehand with guns, then what is the point of having courts, having the police, having laws? Then you just pick up a gun and kill whoever you want to. It should have been done through the legal route," said Maneka Gandhi, member of parliament for the ruling Bharatiya Janata Party (BJP).

Human rights organization Amnesty International called for an independent investigation into the incident.

"Extrajudicial killings are not a solution to preventing rape," Avinash Kumar, Executive Director of Amnesty International India, said. "In a modern and rights-respecting society, using extrajudicial executions to offer justice to victims of rape is not only unconstitutional, but circumvents the Indian legal system and sets a grossly-wrong precedent. An independent investigation is essential."

Supreme Court lawyer Karuna Nundy, who has worked on women's rights and rape cases, said in a tweet that the deaths of the four suspects means it will remain unknown whether they were guilty or innocent.

"Now nobody will ever know if the four men killed by the police were innocent men, arrested fast to show action. And whether four of the most brutal rapists roam free, to rape and kill more women," she said.

Calculated attack

Police allege the 27-year-old was approached by two of the men after noticing a flat tire on her scooter.

According to police, the two men were members of a gang of four who had conspired to sexually assault her. One of the men had let the air out of the tire deliberately, police said.

Three of the gang are alleged to have overpowered the victim and dragged her to an enclosed area a few feet away. They covered her mouth with their hands to silence her.

The four men are then alleged to have taken turns raping the victim, before asphyxiating her and transporting the dead body to the outskirts of Hyderabad. In an effort to conceal their crime, the men are alleged to have poured fuel on her body and set it alight.

Police personnel stand near the site where they shot dead four detained gang-rape and murder suspects as they were re-enacting their alleged crime, in Hyderabad.

Lawmakers in India's Parliament have condemned the Hyderabad incident, demanding stricter legislation and swifter punishment for rapists. Some even called for rapists to be publicly lynched or castrated.

According to India's National Crime Records Bureau (NCRB), around 100 sexual assaults are reported to police in India every day. In 2017, more than 32,000 rapes were reported across the country -- but experts say that the real number is likely much higher, owing to the shame attached to sexual assault and the social barriers faced by victims.