A Hong Kong court on Tuesday sentenced in a mass trial that has decimated the city’s once vibrant pro-democracy opposition and served as a warning that resistance to Beijing can be costly.

The landmark trial is the most forceful use of a national security law Beijing imposed on Hong Kong in 2020 in response to months of large protests against Chinese rule. The prosecution of the activists, the vanguard of Hong Kong’s opposition, has delivered what experts described as a to hopes for democracy in the city.

Their offense, according to the authorities: holding or taking part in an unofficial primary election.

In one fell swoop in 2021, the authorities arrested Benny Tai, 60, a legal scholar and opposition strategist; Joshua Wong, 28, a prominent pro-democracy activist; and dozens of others, including veteran former lawmakers and younger politicians who called for self-determination for Hong Kong.

Mr. Tai was sentenced on Tuesday to 10 years in prison. Several opposition politicians and activists, including Au Nok Hin, Andrew Chiu and Ben Chung, were handed terms of around six and seven years each. Mr. Wong was given a sentence of about four years and eight months.

The trial made clear that any form of dissent or criticism, however moderate, carried significant risk, analysts said. “If you are being critical of the authorities both in Hong Kong and in China, then it’s open season,” Steve Tsang, a Hong Kong-born political scientist and director of the SOAS China Institute in London, said in an interview.

The ruling Communist Party in China says the law is needed to purge threats to Beijing’s sovereignty, but human rights activists, scholars and Western governments have said that it has eroded Hong Kong’s once-vaunted judicial independence.

The case demonstrates how the national security law has reshaped Hong Kong’s political and legal landscape.

Image

Pro-democracy activist Benny Tai, center, in Hong Kong in 2021, after he was charged with violating the city’s national security law.Credit…Vernon Yuen/Agence France-Presse — Getty Images

Even before their sentences were handed down, many of the defendants had already been in jail for nearly four years, as they awaited and then stood trial. That was because the law has made it harder for defendants to be released on bail, which in most nonviolent cases is routinely granted.

The trial was so big that the courthouse had to create what it called a “mega courtroom” to accommodate all the defendants on long benches behind a glass partition. Instead of a jury, the case is being heard by three judges handpicked by the city’s Beijing-backed leader, as allowed by the law.

Prosecutors accused the defendants of “conspiracy to commit subversion,” a national security offense, arguing that the objective of the election primary, which was held in 2020, was to “undermine, destroy or overthrow the existing political system and structure of Hong Kong.”

The pro-democracy camp had said that the primary vote was little different from others held in democracies around the world. More than 600,000 people cast votes, choosing candidates who were prominent supporters of the antigovernment demonstrations that had gripped the city for months. The hope was to maximize the camp’s chances of gaining more seats in a legislative chamber that already heavily favors the Beijing-backed establishment.

But they never had a chance to test the plan: The election was postponed, and most of the candidates were arrested.

Mr. Tai, the legal scholar who was sentenced to 10 years, had designed the electoral strategy, and prosecutors deemed him a mastermind.

Other defendants included Leung Kwok-hung, a 68-year-old activist known as Long Hair for his unkempt mane, who was sentenced to six years and nine months; Claudia Mo, 67, a veteran former lawmaker, sentenced to four years and two months; Lam Cheuk-ting, 47, a former anti-corruption investigator, sentenced to six years and nine months; and Gwyneth Ho, 32, a former journalist who was known for covering on antigovernment demonstrators trapped in a subway station, who was sentenced to seven years.

Mr. Tai and 30 other defendants had pleaded guilty. The court .

Thomas Kellogg, the executive director of the Georgetown Center for Asian Law, said that the politicians who had been arrested had not engaged in activity that would be considered criminal in a place that respected human rights.

“I think that this case will be seen by many in the international community as the final nail in the coffin for the rule of law in Hong Kong,” he said.

Despite the prospect of more prison time, some defendants were simply anxious for the trial that had left their lives in limbo to come to a conclusion, according to friends who had visited them.

Ahead of the sentencing, Emilia Wong, a gender rights activist, said in an interview that her boyfriend, Ventus Lau, an organizer of the 2019 antigovernment protests, had been studying to earn a degree in translation. She said she had been regularly visiting him in detention for the past three years, but it was clear the isolation was taking a toll on him.

“The scary thing about prison is not being locked up in one place. It is the loss of connection with people and society that is scary. To him, it was painful,” she said.