Indian police on Friday fatally shot and killed four men suspected of raping and killing a woman in southern India, leading some to celebrate their deaths as justice in a case that has sparked protests across the country.

The men, who were in police custody and had not been formally charged with any crime, were taken to the crime scenes, both where the rape and killing are suspected of taking place and the spot where the woman's body was burned about half a kilometer (a third of a mile) away, according to Shreedharan, an official in the police commissioner's office who uses one name.

Another police official said the suspects tried to grab an officer's firearm and escape. That officer spoke on condition of anonymity as he was not authorized to speak to the media.

Indian policemen stand guard the area where rape accused were shot in Shadnagar some 50 kilometers or 31 miles from  Hyderabad, India, Friday, Dec. 6, 2019. An Indian police official says four men accused of raping and killing a woman in southern India have been fatally shot by police. (AP PhotoMahesh Kumar A.)

Indian policemen stand guard the area where rape accused were shot in Shadnagar some 50 kilometers or 31 miles from Hyderabad, India, Friday, Dec. 6, 2019. An Indian police official says four men accused of raping and killing a woman in southern India have been fatally shot by police. (AP PhotoMahesh Kumar A.)

The burned body of a 27-year-old woman was found last week by a passer-by in an underpass in Hyderabad after she went missing the previous night.

The high-profile case has sparked protests across India.

About 300 people gathered at the crime scene in Shadnagar, a town in the state of Telangana about an hour southwest of Hyderabad, to praise police for killing the suspects.

People throw flower petals on the Indian policemen guarding the area where rape accused were shot, in Shadnagar some 50 kilometers or 31 miles from  Hyderabad, India, Friday, Dec. 6, 2019. An Indian police official says four men accused of raping and killing a woman in southern India have been fatally shot by police. (AP PhotoMahesh Kumar A.)

People throw flower petals on the Indian policemen guarding the area where rape accused were shot, in Shadnagar some 50 kilometers or 31 miles from Hyderabad, India, Friday, Dec. 6, 2019. An Indian police official says four men accused of raping and killing a woman in southern India have been fatally shot by police. (AP PhotoMahesh Kumar A.)

Some hugged officers and lifted them into the air chanting "long live police," while others showered them with flowers.

Associated Press writers Mohammed Shafeeq in Hyderabad and Chonchui Ngashangva in New Delhi contributed to this report.

People throw flower petals on the Indian policemen guarding the area where rape accused were shot, in Shadnagar some 50 kilometers or 31 miles from  Hyderabad, India, Friday, Dec. 6, 2019. An Indian police official says four men accused of raping and killing a woman in southern India have been fatally shot by police. (AP PhotoMahesh Kumar A.)

People throw flower petals on the Indian policemen guarding the area where rape accused were shot, in Shadnagar some 50 kilometers or 31 miles from Hyderabad, India, Friday, Dec. 6, 2019. An Indian police official says four men accused of raping and killing a woman in southern India have been fatally shot by police. (AP PhotoMahesh Kumar A.)