SINGAPORE (Reuters) - A Singapore court on Tuesday convicted a rights activist and an opposition politician of contempt of court, punishable by up to three years in jail, for online comments posted on Facebook, the first such ruling under a new law.

The wealthy Asian city state's High Court found Jolovan Wham, a vocal government critic, and John Tan, a member of the opposition Singapore Democratic Party, guilty of "scandalising the judiciary" with the social media posts.

The posts of both Wham and Tan "posed a risk that public confidence in the administration of justice would be undermined," Judge Woo Bih Li said in his ruling.

Wham's post "impugned the integrity and impartiality of Singapore’s judges, and thus the Singapore courts" by implying judges were not independent and were partial to the government, he added.

The convictions are the first under the Administration of Justice (Protection) Act that took effect a year ago, the Singapore Attorney General's Chambers (AGC) said, with sentencing set for Nov. 7.

Convictions carry a fine of up to S$100,000 (55,300 pounds) in addition to the maximum term of three years.

In a Facebook post after the ruling, Wham said he would await sentencing. Tan's party does not have an elected member in parliament, which is dominated by the ruling People's Action Party.

Wham's lawyer, Eugene Thuraisingam, said he had argued his client was not contemptuous of the judiciary as he was "merely comparing the relative independence" of judges in different jurisdictions. The defendants have made no decision about an appeal, he added.

New York-based Human Rights Watch, which has urged Singapore to repeal laws and rules it says restrict free speech and public assembly, said the law fundamentally infringed basic rights.

"By using this law on scandalising the courts against political activists, the Singapore government blatantly violated freedom of expression and confounded any real sense of justice," Phil Robertson, its deputy Asia director, said by email.

"The real tragedy in this whole situation is Singapore thinks it’s OK to employ such a rights-abusing law."