A Malaysian court acquitted opposition leader Anwar Ibrahim of sodomy charges Monday, a surprise ruling that could accelerate the political comeback of one of Asia's most celebrated reformers ahead of an expected election this year.

Judge Zabidin Mohamad Diah found Anwar not guilty due to doubts over whether the DNA samples tendered as evidence had been contaminated.

And because it was a sexual offence, the court is reluctant to convict on uncorroborated evidence therefore the accused is acquitted and discharged, Zabidin told a packed courtroom in the Malaysian capital.

Sex between males is a criminal offence in this mainly Muslim country of 28 million people. A conviction would have meant a jail term of up to 20 years, effectively ending Anwar's political career.

In the coming election, voice of the people will be heard and this corrupt government will be toppled from its pedestals of power, read a Twitter message from Anwar's account, minutes after the verdict.

The trial mirrors a 1998 case, in which Anwar was jailed on sodomy and corruption charges after being sacked as deputy prime minister and finance minister. He was freed in 2004 when the conviction was overturned.

Anwar has long contended the trial was a government plot to prevent him from taking power at the next election that is not due until 2013 but may be called this year before a potential global downturn stalls Malaysia's economic growth.

Malaysia has an independent judiciary and this verdict proves that the government does not hold sway over judges' decisions, the government said in statement that also praised Prime Minister Najib Razak for bold democratic reforms.

Najib's approval ratings have fallen over the year due to a growing religious divide that has alienated minority non-Muslims and fanned middle-class anger over inflation and the slow pace of promised political reforms.

PROTESTS

Earlier, about 2,000 Anwar supporters had gathered outside the court, chanting slogans and carrying banners under heavy police presence.

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

Leaders from the three-party opposition alliance, which include Islamists and an ethnic Chinese party, have said they will continue to campaign for a change of government after Anwar gets jailed.

(Reporting by Niluksi Koswanage.; Writing by Liau Y-Sing. Editing by Jason Szep and Sanjeev Miglani)