TAIPEI, Taiwan — A Chinese court handed prison sentences on Wednesday to 10 young Hong Kongers caught at sea while attempting to flee the crackdown in their city, sending a warning shot to other pro-democracy protesters hoping to evade arrest.

They are part of a group known as the “Hong Kong 12” whose desperate escape and capture by China’s coastguard in August crystallized anxiety over Beijing’s increasingly punitive response to dissent in the Chinese territory.

A notice from the Yantian People’s Procuratorate in Shenzhen said Tang Kai Yin, 31, was sentenced to three years in prison and fined about $3,000 for organizing an illegal border crossing. Another defendant, Quinn Moon, 33, was sentenced to two years and fined about $2,300. The remaining eight received seven months in prison and fines of $1,500 for participating in an illegal border crossing.

The court said it made its judgment “taking into account the circumstances of each defendant’s crime, its harmful consequences and their admission of guilt.” It did not say where the defendants would serve their sentences. The court did not pursue cases against two in the group who were minors when charged over the escape plot; they were returned to Hong Kong police custody on Wednesday.

The 12 Hong Kongers, who were between ages 16 and 33 when detained, were affiliated with the pro-democracy protest movement that gripped the Asian financial center last year — the most public repudiation of the Communist Party’s rule on Chinese soil since 1989. All but one were out on bail, facing charges related to the protests.

Fearing persecution under a sweeping new national security law that Beijing imposed to stamp out demonstrations, the group on Aug. 23 took a speedboat from a fishing village with the aim of reaching Taiwan. They were detained a few hours later in Chinese waters and held in Shenzhen. On Monday, 10 of them were put on trial in a barricaded courthouse that diplomats, family members and foreign journalists were barred from entering.

The case, coming on the heels of the contentious security law, is likely to have a further chilling effect on a city previously known for its vibrant protest culture and protection of civil liberties. The law punishes vaguely defined crimes such as “secession” and “foreign interference” with heavy prison sentences and the possibility of trial in Chinese courts. Activists and pro-democracy campaigners face the stark choice of remaining in Hong Kong, awaiting likely arrest, or fleeing abroad.

“This episode will create an atmosphere of terror among dissidents and activists,” said Ho-Fung Hung, a professor of political economy at Johns Hopkins University. “This episode indicates the Hong Kong and Chinese authorities are serious about finding ways to stem the flight of Hong Kong people fearing arrest.”

Beijing’s crackdown has intensified in recent months. Student activist Tony Chung, who was among the first to be arrested under the national security law, was sentenced on separate charges Tuesday to four months in prison for “desecrating” the Chinese flag at a protest in May last year.

On Wednesday, media tycoon and democracy activist Jimmy Lai resigned as chairman of his publishing company, Next Digital, to “spend more time dealing with his personal affairs,” according to a company statement. Lai also faces charges under the security law.

The families of the Hong Kongers detained in Shenzhen said they worried whether they would be able to visit their loved ones and what conditions they would face in prison.

“Although we expected the worst, when the sentencing came it was very hard to accept. Three years is not long, but it is not short either,” said the brother of Tang Kai Yin, who spoke on the condition of anonymity for security reasons.

The group includes Andy Li, an activist who lobbied for international attention to what protesters saw as China’s encroachment on Hong Kong and violation of the “one country, two systems” framework, which was supposed to assure a high level of autonomy for the former British colony after its return to Chinese sovereignty in 1997. Li, who had previously been arrested under the national security law, was given seven months in prison.

Li Tsz-yin, who was also sentenced on Wednesday to seven months, was a first aid volunteer previously arrested at an unauthorized rally in September 2019.

“Now I want him to come back as soon as possible,” said his mother, who asked to be identified by only her surname, Chan, citing security concerns.

Chan said she hoped to visit her son as soon as possible. “I hope the mainland [authorities] can notify us when we can visit them, how long each time and the procedures and whether I can take winter clothes or buy food for my son,” she said. “I’m very nervous right now.”

Human rights advocates, lawyers and foreign diplomats have said the imprisoned Hong Kongers are at risk of torture and mistreatment in China’s opaque judicial system. Families of the defendants said the 12 were barred from choosing their own lawyers and have not been able to independently contact their relatives.

In a statement on Tuesday, the European Union called for the “immediate release” of all 12 Hong Kongers, criticizing Chinese authorities for barring diplomats and journalists from the proceedings.

“The defendants’ rights to a fair trial and due process — in accordance with international human rights law and as provided by China’s Criminal Procedure Law — have not been respected. We call on China to guarantee procedural fairness and due process of law for these individuals,” it said.

Yu reported from Hong Kong.