HONG KONG — A Hong Kong court sentenced veteran pro-democracy leaders to between eight and 18 months in prison on Friday and gave others suspended sentences on charges of unauthorized assembly stemming from 2019 protests against China's tightening control of the city.

The penalties for the nine defendants, following guilty verdicts earlier this month, marked a new low for the viability of democratic opposition in Hong Kong as Beijing remodels the city into one that resembles any other in China.

Media tycoon Jimmy Lai, already jailed and denied bail over separate national security charges, was sentenced to 14 months for his role in two protests. Branded a “traitor” by Chinese state media, Lai faces several criminal prosecutions, four of which unfolded in court Friday. At one of these hearings, the authorities handed Lai an additional national security charge that is punishable by life in prison.

Four of the defendants — including lawyers and former lawmakers Martin Lee, 82; Margaret Ng, 73; and Albert Ho, 69 — received suspended sentences, with the judge citing their age and contributions to society. This means that they will not be sent to prison immediately but could be jailed upon any minor infraction.

The mostly elderly defendants have spent their lives dedicated to democratic causes, and their former ability to live and work freely in Hong Kong was one of the differences between the city and the authoritarian mainland. One of the defendants, 64-year-old Lee Cheuk-yan, is known for his role in organizing an annual vigil in Hong Kong commemorating the 1989 Tiananmen Square massacre, which the Chinese government has erased from history on the mainland. He was also sentenced to 14 months on Friday.

Sophie Richardson, China director of Human Rights Watch, characterized the court’s decision as a sentence against “democracy, law and a free press.” Yamini Mishra, Amnesty International’s Asia-Pacific director, said Hong Kong authorities, “having arrested the majority of Hong Kong’s most prominent dissidents using the repressive national security law,” are now “mopping up” and jailing remaining critics on political charges.

Judge Amanda Woodcock said the group’s actions amounted to a “rallying cry,” encouraging people to march illegally on Aug. 18, 2019. Hong Kong then was in the midst of a revolt against Beijing’s tightening grip.

The demonstration began as a legal assembly in Victoria Park. But it became huge, as an estimated 1.7 million participants began streaming onto streets and marching across parts of the city — which was not authorized. It was entirely peaceful.

The judge earlier said that she did not agree with the argument that the defendants should not be prosecuted because the march was ultimately peaceful and that she believed the preservation of public order was key. Their actions, she added, caused traffic disruptions and road closures.

“Immediate imprisonment is the only way,” she said.

It is the first sentence for most of the group, including Lai, who, while facing many charges, had no prior conviction. Last April, former lawmaker Au Nok-hin, sentenced to 10 months over the unlawful assembly charges on Friday, was separately sentenced to nine weeks in prison for using a loudspeaker near a police officer, which a judge ruled was assault. He and another defendant, Leung Kwok-hung, better known as “Long Hair,” are among dozens detained without bail under the national security law for participating in a primary vote, and were already in jail.

Since the uprising in 2019, the Chinese Communist Party has sought to weed out those it believed to be responsible, though the movement was largely leaderless, organized over messaging boards and secure apps.

Beijing has labeled Lee, Ho and Lai as part of a new “Gang of Four” colluding with “Western forces” to topple Hong Kong. Local officials have repeatedly accused activists of working with “foreign agents” and stoking unrest, without offering evidence.

Another set of younger activists frequently targeted by Beijing — Joshua Wong, Agnes Chow and Ivan Lam — were imprisoned in December for organizing and participating in an unauthorized assembly.

After the protests, Beijing imposed the national security law on Hong Kong, punishing broadly-worded crimes of secession, foreign collusion, terrorism and subversion of state power with up to life in prison. Most of those charged under the law have been denied bail; taken together, every prominent opposition voice is either in jail or in exile.

Beijing, meanwhile, has moved to rewrite electoral rules and impose a “patriotism” test to ensure Hong Kong is unequivocally controlled by Communist Party loyalists.

Addressing the court before her sentencing, Ng, who was also a lawmaker for almost two decades, said she had a “personal conviction” in what she did.

There is “no right so precious to the people of Hong Kong as the freedom of expression and the freedom of peaceful assembly,” she said, characterizing it as “the last safety valve in a democratic society.”

“I stand the law’s good servant but the people’s first,” Ng added in her statement. “For the law must serve the people, not the people the law.”