Malaysia's High Court acquitted opposition leader Anwar Ibrahim of sodomizing a former aide, citing unreliable DNA evidence in a verdict Monday that surprised supporters who saw the case as an attempt to sideline him.

Anwar said the verdict left him free to focus on trying to topple Prime Minister Najib Razak's long-ruling coalition in national elections that many predict will be held within months. The opposition has long maintained that the government concocted the charge to damage Anwar's chances of leading his three-party alliance to an election victory. Najib denies plotting against Anwar.

Najib's administration said the judgment showed that Malaysia's legal system was free from government interference, despite claims to the contrary by opposition activists.

The case rested mainly on testimony by Anwar's 26-year-old accuser, Saiful Bukhari Azlan, and semen samples found on Saiful's body that investigators said matched Anwar's DNA.

'I have been vindicated. To be honest I am a little surprised'—Anwar Ibrahim

High Court Judge Mohamad Zabidin Diah said his decision was founded on concerns that the DNA evidence was tainted.

"The court at this stage could not with 100 per cent certainty exclude the possibility that the [DNA] sample is not compromised," Mohamad Zabidin told the court. "Therefore it is not safe to rely on the [DNA] sample. There is no evidence to corroborate" the charge.

A crowd of Anwar's supporters shouted "Allahu Akbar," or "God is great" after the judge finished reading the verdict. Anwar's wife and children burst into tears and hugged him.

"Thank God justice has prevailed," a jubilant Anwar told reporters. "I have been vindicated. To be honest, I am a little surprised."

However, questions lingered over whether the legal saga was over, as chief prosecutor Yusof Zainal Abiden said he had not decided whether to appeal the acquittal.

Police outside the court reported that after the verdict was delivered, three small blasts wounded two people on roads nearby. Officials indicated they were caused by homemade explosives, but did not say whether they were linked to the case.

'Malaysia has an independent judiciary'

Anwar, whom the opposition regards as its future prime minister if it wins federal power, had earlier said he was bracing for a conviction, which could result in a maximum of 20 years in prison.

Anwar is the opposition's most charismatic politician and is considered the figure who can best hold the three ideologically distinct parties in his alliance together.

Information Minister Rais Yatim said in a statement that the acquittal "proves that the government does not hold sway over judges' decisions."

"Malaysia has an independent judiciary," Rais said. "The current wave of bold democratic reforms introduced by [Najib] will help extend this transparency to all areas of Malaysian life."

Phil Robertson, deputy director of New York-based Human Rights Watch's Asian division, said Anwar should never have been charged in the first place, adding that the case had been "politically motivated and plagued with irregularities."

At least 5,000 opposition supporters gathered outside the court Monday, chanting "Long live the people." Some carried banners that read "Free Anwar" and "Reject slander."

Anwar, a former deputy prime minister and married father of six, was jailed in another sodomy case in 2000 when he was convicted of sodomizing his family's ex-driver. He denied the allegation, and Malaysia's top court released him in 2004 by overturning his conviction and nine-year sentence.

The opposition now controls slightly more than one-third of parliament's seats and hopes to win power by pledging to reduce problems such as graft, racial discrimination and curbs on civil liberties. Najib has increased efforts in recent months to tackle those grievances and regain the support of voters who deserted the National Front in the last elections.

Sodomy, even consensual, is illegal in Muslim-majority Malaysia. The law against it is seldom enforced, but human rights activists say it should be abolished because it encourages homophobia.