About 2,000 supporters of Malaysian opposition leader Anwar Ibrahim rallied outside a court on Monday, protesting against a justice system they fear will convict him of sodomy later in the day in what they regard as a political trial.

Anwar faces up to 20 years in jail if convicted of sodomy, a criminal offence in this mainly Muslim country.

The crowd shouted slogans and carried banners under heavy security outside the court, which is due to hand down its verdict in the long-running case after 9 a.m. (0100 GMT).

Riot police were on standby and a helicopter circled overhead as the protesters, mostly men dressed in white and wearing Anwar masks, braced for the verdict which is expected to determine the future of the three-party opposition coalition.

Judge Zabidin Mohamad Diah is scheduled to deliver the decision after weighing nearly two years of testimony. Anwar is charged with having had sex with a male former aide.

We did not expect a fair trial and there will not be a fair verdict today, said Mohammad Adam, a 28-year old clerk, who had turned up for the verdict.

People are very disappointed with this government.

Supporters chanted reformasi (reform) and held up placards reading People are the judge and We are against slander.

Anwar has maintained that the charge is a political ploy to prevent the opposition coalition from wresting power after the group posted its best-ever result in the 2008 general election.

The Anwar sodomy case, the second against him in 14 years, had grabbed headlines with graphic details of sexual acts but angered opposition supporters and unsettled foreign diplomats concerned that the judicial process was being used as a political tool.

One Anwar supporter tweeted Today we are all Anwar Ibrahim, to which Anwar replied via Twitter, Be yourself and stand for justice.

Anwar, a former rising star in Malaysian politics, was previously jailed for sodomy and corruption after he was sacked as deputy prime minister in 1998. He was freed in 2004 after the country's top court overturned the sodomy conviction.

A guilty verdict on Monday is expected to spell the end of the 64-year old Anwar's political career and could deliver a temporary set-back to the opposition coalition.

The moderate Muslim leader is regarded as the glue that binds together an unlikely opposition grouping which includes a secular mainly ethnic Chinese party and a conservative Islamist group.

Anwar says the opposition has identified his successor should he be taken out of the picture but he has not named the candidate. However, some analysts say a conviction could bolster the opposition's fortunes with Anwar's imprisonment expected to garner public sympathy.

(Reporting by Niluksi Koswanage and Emily Kaiser; writing by Liau Y-Sing; Editing by Mark Bendeich)