HANOI, Vietnam — A court in northern Vietnam on Wednesday sentenced a student activist to six years in prison for using social media to promote a multiparty system and press freedom amid a heightened crackdown on dissent.

Phan Kim Khanh was also given four year of probation after being convicted of spreading propaganda against the state at the trial that lasted half a day in Thai Nguyen province, his lawyer Ha Huy Son said.

“The evidence (presented against him) was groundless and I think the sentencing is absurd,” Son said.

Son said the court convicted Khanh of opposing the communist state by using his two blogs and a YouTube channel to promote multiparty democracy and press freedom.

Khanh admitted in court to have run the social media platforms, but said his main purpose was to fight corruption and he did not know that constituted a crime, Son said.

The 24-year-old was arrested in March while in his final year of an international studies degree at the Thai Nguyen University.

Human rights groups have appealed for his immediate release and called on leaders of the Asia Pacific Economic Cooperation meeting in Vietnam next month, including President Donald Trump, to pressure Hanoi to improve its rights record.

“International donors and trade partners need to step up pressure on the country’s leaders to improve its abysmal rights record, and the APEC Summit is a good moment to start,” Brad Adams, Asia director at Human Rights Watch, said in a statement.

Police have arrested at least 28 people and charged them with “vaguely interpreted” national security violations over the past year, according to Human Rights Watch.

The communist state does not tolerate any challenge to its one-party rule and maintains that only law breakers are put behind bars.