In a short clip, protesters shout “hang them” after four of the six attackers in the Delhi rape case were sentenced to death. (Annie Gowen/The Washington Post)

Four men were sentenced Friday to death by hanging for the brutal gang-rape and murder of a New Delhi student on a bus, a crime that roiled India and drew international attention to the problem of sexual violence in the country.

Saket District Court Judge Yogesh Khanna said in the short sentencing Friday afternoon that the court could not ignore cases such as the bus attack in December, which “shocked the collective conscience of India.”

“In these times when crime against women is on the rise, courts cannot turn a blind eye towards such gruesome crime,” Khanna said. “There cannot be any tolerance. . . . This crime in every way falls within the rarest-of-rare category, warranting a death sentence.”

After the sentence was read, one of the younger defendants wept and one of their attorneys, A.P. Singh, shouted: “This is not the victory of truth. But it is the defeat of justice!” The lawyers said they will file an appeal within a month.

Outside the courthouse, dozens of protesters and bystanders cheered when the verdict was announced.

“We are very happy with the sentencing,” said the victim’s younger brother, Gaurav Singh.

The victim’s parents — Badrinath Singh, 53, and his wife, Asha Devi, 45 — had repeatedly said they wanted to see all four men hanged for the killing of their daughter, a 23-year-old physical therapy student who was gang-raped and tossed from a moving bus.

(The Washington Post generally does not identify the victims of sexual assault, but the parents agreed to give their names and to be photographed to raise public awareness about the crime.)

Tensions ran high all week at the courthouse, where a small knot of protesters, some of whom had donned black hoods and hangmen’s nooses, had gathered, chanting, “Hang them!”

Prosecutors this week had asked for the death penalty for the attackers — Akshay Thakur, 28; Vinay Sharma, 20; Pawan Gupta, 19; and the younger brother of the bus driver, who in court papers is identified by a single name, Mukesh, 26. They were convicted of murder, rape, conspiracy and other charges Tuesday.

Public prosecutor Dayan Krishnan argued before the court that the appropriate sentence was “nothing short of death” for a “diabolical” attack that shocked millions of Indians.

“There is no element of sympathy in the way in which the hapless woman was tortured,” he said.

But the defendants’ attorneys argued that the men, particularly Sharma, a gym assistant, and Gupta, a fruit seller, could be rehabilitated in prison if they were given life sentences instead of the death penalty.

More than 400 people are on death row in India, but executions are rare. The country’s most recent execution was in February, when a Kashmiri terrorist was hanged for his role in a 2001 attack on the country’s Parliament.

The courthouse where the men were sentenced is just across the road from the mall cinema where the young woman and her boyfriend had watched the “Life of Pi” before trying to make their way back to the Delhi neighborhood of Dwarka the night of Dec. 16.

In a thick, 237-page ruling this week, the judge described in meticulous and painful detail the horror that followed: The couple boarded one of India’s many private buses, hoping it would provide safe passage home. Aboard the bus were a driver, four other men and a juvenile, most of whom hailed from Delhi’s Ravi Dass slum. They were drunk and had taken the bus out into the night, looking for sex.

According to court documents, the men attacked the couple, beating them before taking the “helpless” woman to the back of the bus and raping her one by one, then penetrating her body with iron rods.

The woman died at a hospital in Singapore several days later. The bus driver, Ram Singh, committed suicide in his jail cell in March, and the defendant who was a juvenile at the time of the attack was convicted last month and sentenced to three years in a detention facility. That defendant has since turned 18.

The case sparked days of protests in the capital and around the country and inspired a subsequent anti-rape law that criminalizes offenses such as stalking, voyeurism and acid attacks. Although rapes in both rural and urban areas of India have continued, advocates say the attention the case received has had an impact.

Karuna Nundy, a lawyer and advocate for India’s Supreme Court, said police data in New Delhi show that this year, there were 1,036 reported rapes through August, up from 433 in the same period last year. She says the increase shows that women — who may have felt shame and fear before and not reported assaults — feel more empowered to do so.

“It’s all very new, and some of the changes are quite dramatic,” she said. “It’s a beginning.”

This article contains material from pool reports from inside the courtroom. Rama Lakshmi and Suhasini Raj contributed to this report.