Malaysian politician says justice has been served and pledges to topple the government in next elections.

Al Jazeera’s Harry Fawcett spoke to Anwar Ibrahim after the verdict at the Kuala Lumpur High Court

Malaysian opposition leader Anwar Ibrahim has been acquitted in a surprise end to a politically charged sodomy trial.

The popular leader has called the trial a government bid to cripple his opposition ahead of upcoming polls.

The ruling by Judge Mohamad Zabidin Diah set off celebrations in the Kuala Lumpur High Court, with Anwar mobbed by his wife, daughters and opposition politicians in joyous scenes.

“Thank God, justice has been served,” Anwar said after the judge pronounced him not guilty.

“I feel vindicated, but we still have an agenda and a struggle. We now have to focus on the general elections,” he said.

In a posting on his Twitter feed shortly after the ruling, Anwar said: “In the coming election, [the] voice of the people will be heard and this corrupt government will be toppled from its pedestals of power.”

Cheering supporters

Thousands of Anwar supporters, who gathered outside under heavy security, erupted into cheers and raised their fists of support in the air as news of the verdict filtered out.

In his brief verdict announcement, Zabidin said he could not rely on controversial DNA evidence submitted by the prosecution.

Al Jazeera Harry Fawcett reports from Kuala Lumpur

“The court is always reluctant to convict on sexual offences without corroborative evidence. Therefore, the accused is acquitted and discharged,” he said.

It was the second sodomy verdict in a dozen years for Anwar, a former deputy premier in the 1990s, who was next in line to head the country’s long-ruling government until a spectacular downfall.

The charismatic Anwar had been groomed to succeed former prime minister Mahathir Mohamad until a bitter row between them saw Anwar ousted in 1998, beaten and jailed on sodomy and corruption charges widely seen as politically motivated.

Once the sodomy charge was overturned in 2004 and he was released, the affair threw Anwar into the opposition, which he led to unprecedented gains against his former ruling party in 2008 general elections.

But the new sodomy charges emerged shortly after those polls, accusing Anwar of sodomising a former male aide, the charges sparked accusations they were concocted by the ruling United Malays National Organisation to stall the opposition revival.

Sodomy is illegal in Muslim-majority Malaysia and punishable by 20 years in jail.