A Hong Kong court sentenced pro-democracy leaders to prison for undermining power, following a controversial national security trial, according to the BBC.

Benny Tai and Joshua Wong were part of the so-called Group of 47 Hong Kong activists involved in a scheme to select opposition candidates for local elections. Tai was sentenced to 10 years in prison, while Wong was sentenced to more than four years.

Most of the group were found guilty of conspiracy to attempt to undermine power, while two individuals were acquitted.

Their trial marked the largest use of China’s tough National Security Law (NSL) imposed on Hong Kong shortly after the city’s violent pro-democracy protests in 2019.

In these protests, hundreds of people took to the streets of Hong Kong for months. Over a proposed government plan that would allow extradition from Hong Kong to mainland China, the protests quickly expanded to include broader demands for democratic reforms.

Observers say the national security law and the outcome of the trial have significantly weakened the city’s pro-democracy movement and rule of law and allowed China to consolidate control of the city.

The US described the trial as “politically motivated”while on Tuesday Australia said it had “strong objections” to the use of the NSL and was “gravely concerned” about the conviction of one of its citizens.

The governments of Beijing and Hong Kong argue that the law is necessary to maintain stability and deny that it has weakened autonomy. They also argue that the convictions serve as a warning against forces trying to undermine China’s national security.

Tai, a former law professor who devised the scheme for the unofficial primary, received the longest sentence with judges saying that “supported a revolution”.

Wong’s sentence was reduced by a third after he pleaded guilty. But unlike some other defendants, he was not given a further reduction in sentence, as judges “they did not consider him a person of good character”. At the time of the arrests, Wong was already in prison for participating in protests.