All four men convicted of raping and murdering a 23-year-old woman in Delhi were sentenced to death on Friday, nine months after a crime whose savagery triggered furious protests across India and rare national debate about violence against women.

"Everybody got the death penalty," defence lawyer A.P. Singh told reporters outside the Delhi courtroom, where dozens of police had formed a barricade to keep crowds back.

One of the four men sentenced to death by hanging, gym instructor Vinay Sharma, was dragged out of the court crying.

The victim, who was raped for an hour and tortured with an iron rod on a moving bus, became a symbol of the dangers women face in a country where a rape is reported on average every 21 minutes and acid attacks and cases of molestation are common.

"This has shocked the collective conscience of society," Judge Yogesh Khanna told the court, referring to the attack.

The four men were sentenced to death despite their lawyers' pleas to ignore popular and political pressure for a penalty handed down in only the "rarest of rare" cases.

Lawyer A.P. Singh, who represented two of the convicts in the trial, said hours before the sentencing that it would be "based on the emotions of the people".

"This sentencing is under political pressure," he said.

The sentencing capped a seven-month trial, often held behind closed doors, that was punctuated dramatically by a fifth defendant hanging himself in his jail cell. A sixth, who was under 18 at the time of the attack, was earlier sentenced to three years detention, the maximum allowed under juvenile law.

It was one of the biggest tests in years of India's paradoxical attitude towards the death penalty.

The country's judges hand down, on average, 130 death sentences every year but India has executed just three people in the past 17 years. Despite its apparent reluctance to carry out the sentences, last year India voted against a U.N. draft resolution calling for a global moratorium on executions.

In November, India ended what many human rights groups had interpreted as an undeclared moratorium on capital punishment when it executed a man convicted for the 2008 militant attack on the city of Mumbai. Three months later, it hanged a Kashmiri separatist for a 2001 militant attack on parliament.

"In the past year, India has made a full-scale retreat from its previous principled rejection of the death penalty," said Meenakshi Ganguly, South Asia director of Human Rights Watch.

The hanging of the two militants came after a seven-year gap in executions, the last being a man who was convicted of raping and killing a schoolgirl in the city of Kolkata.

Prosecutors had called for the "harshest punishment" to be given to Sharma, bus cleaner Akshay Kumar Singh, fruit-seller Pawan Gupta, and unemployed Mukesh Singh for last December's murder to signal that such attacks cannot be tolerated.

The four men were found guilty of luring the woman onto a bus, raping and torturing her with a metal bar and then throwing her naked and bleeding onto the road. She died two weeks later.

Violent protests exploded in several cities after the crime, a reaction commentators and sociologists said reflected a deep well of frustration that many urban Indians feel over what they see as weak governance and poor leadership on social issues.

The government, seen as out of touch with the aspirations of the burgeoning urban middle class, was caught off guard by the protests.

DIVIDED ON DEATH

The Delhi case led to the introduction of tougher rape laws in March, and for the first time open conversation about gender crime in television debates, social media and even Bollywood.

Still, sex crimes remain commonplace in India, and social commentators say patriarchal attitudes towards women have not been diluted by more than a decade of rapid economic growth.

Comments on social media websites and elsewhere ahead of the sentencing suggested that popular opinion was in favour of executing the men, although a survey by a news -The Hindu newspaper in July showed Indians were divided on the merits of capital punishment.

The victim's parents have said their daughter's dying wish was for her attackers to be "burned alive".

A potentially years-long appeals process lies ahead for the four men. The case will go to the High Court and then Supreme Court. If they confirm the sentences, the final decision will lie with the president, who has the power to grant clemency.

Although the Supreme Court ruled in the 1980s that the death penalty should be imposed only in the "rarest of rare" cases, opponents say the reality is quite different.

Indian courts sentenced 1,455 prisoners to death between 2001 and 2011, according to the National Crime Records Bureau.

There are 477 people on death row. Many have been there for years. Human rights groups have been alarmed, however, by the vigour with which President Pranab Mukherjee, who was sworn into office in July 2012, has acted in clearing the backlog of clemency pleas. He has rejected 11, confirming the death penalty for 17 people.

Retired Delhi High Court judge R.S. Sodhi attributes the country's low execution rate to former presidents being "too soft", wary of any backlash from what he described as a divided public.

Sodhi, who said he sentenced five people to death during his time on the bench, now opposes the death penalty.

"A life sentence is the biggest sentence you can give. Imagine rotting for the rest of your life in jail," he said.

It is a view echoed by some women's rights groups and legal experts who had opposed executing the physiotherapist's attackers. Others have invoked the Gandhian principle that "an eye for an eye makes the whole world blind".

But top politicians, including the interior minister, had said the death penalty was assured in the case. Such comments were seen by some as adding to pressure on the court to make a populist ruling to satisfy the public outrage over the attack.

Superb!! For once its been victory of the people!! Delhi Rape Victim...Nirbhayas Rapists To HANG! Bunch of... http://t.co/oHNvCZMsAa