Hong Kong democracy activist Avery Ng was Tuesday found guilty of assault for throwing a sandwich towards the city’s then-leader which hit a police officer.

Ng, 40, chairman of political party the League of Social Democrats, was sentenced to three weeks in jail but released on bail pending an appeal.

Pro democracy activist Avery Ng reacts outside the West Kowloon Court after posting bail following a guilty verdict and sentencing of three weeks in his sandwich “attack” case in Hong Kong on October 31, 2017. Photo: Anthony Wallace/AFP.

It was the latest in a series of cases against democracy activists which have led to accusations of interference in the judiciary as Beijing tightens its grip on the semi-autonomous city.

Judge So Wai-tak said the sentence was a “deterrent” against what he described as “violent means” used in protests against government policies, although he acknowledged the fact that the weapon was a sandwich merited a shorter jail term.

Afterwards Ng told reporters he believed the judicial system was being used by the city’s Beijing-backed government.

“Only in such a ridiculous place as the current Hong Kong will you see a sentence of three weeks,” he said.

Ng told the court he had thrown what he described as a “smelly fish sandwich” at Hong Kong’s unpopular then-chief executive Leung Chun-ying as he was on his way to vote in the September 2016 legislative election.

Leung Chun-ying. File photo: In-Media.

He said the sandwich was a protest prop to show that the poor in Hong Kong may not be able to afford even a simple breakfast. It illustrated the pro-democracy camp’s demand for a universal retirement protection plan.

Ng added that he had wanted to hand the sandwich to Leung but when he was blocked by police he threw it instead.

Leung, in office from 2012 until July this year, was accused by opponents of overseeing the erosion of Hong Kong’s freedoms.

The former leader had told Ng’s trial he felt “panic” at the time of the sandwich throwing.

It followed an incident in 2014 where an anti-China lawmaker threw a glass at Leung in the legislature.

The glass did not hit him but the lawmaker was convicted of assault and jailed for two weeks.

Some online commenters poured scorn on what they saw as a surprisingly harsh sentence Tuesday.

“Even treating Leung Chun-ying to a sandwich is a crime?” questioned one Facebook user.

Umbrella Movement leaders Joshua Wong, Nathan Law and Alex Chow were jailed in August over their roles in the mass 2014 pro-democracy rallies after the government successfully sought to overturn previous non-custodial sentences passed by a lower court.