Malaysian opposition leader Anwar Ibrahim has been acquitted of sodomy, a charge he has always maintained was trumped up to discredit him and ruin him politically.

Anwar was accused of sodomising a male, former aide in 2008. The verdict was delivered in just under five minutes, a sharp contrast to the trial, which has been going on for two years.

The high court judge, Zabidin Diah, said he could not be 100 per cent certain that the DNA evidence had not been compromised, and that he was reluctant to convict on uncorroborated evidence.

As soon as the verdict was delivered, shouts of "Allahu Akbar" or "God is Great" rang out in the court room.

Outside the building, thousands of Anwar supporters who had gathered in the car park since early morning, erupted into cheers and whoops of joy.

Taken by surprise

The acquittal has taken most people by surprise. In the days leading up to the verdict, Anwar had said he was mentally prepared to go to prison. Now he says feels vindicated by the decision.

He told Al Jazeera:"I acknowledge the fact that this took some courage on the part of the judge to come up with what was a shock decision. But I am at least vindicated. But to suggest therefore that the judiciary is independent I think remains to be seen."

Nonetheless, the opposition coalition trumpeted the verdict as a victory. Anwar told his supporters that they would have to focus on winning the general election.

National polls have to be held by March 2013 but many expect it to be called within months. Anwar rallied the crowd, asking them where they wanted to meet again, to which the crowd roared "Putrajaya", referring to Malaysia's administrative capital. 

Ibrahim Suffian, director of the Merdeka Center for Opinion Research in Selangor, said the acquittal meant Anwar would be able to front the election campaign without the noose of a sentence hanging around his neck. 

It would also free the opposition coalition from having to deal with the messy business of implementing a succession plan.

Fractious leadership

Anwar has long been the glue holding together a sometimes fractious relationship between three coalition parties, which includes an Islamist party and a more liberal, secular-minded one. 

However, the government has also emerged a winner in the decision. The verdict, the Merdeka Centre's Ibrahim said, "would boost the government's credibility in terms of pushing ahead with democratic reforms and freeing up the judiciary".

Other political analysts agreed that the verdict would have a positive impact on the government because it was proof of government non-interference. 

Shortly after the ruling was delivered, the government issued a statement saying Monday’s verdict showed that "Malaysia has an independent judiciary and this verdict proves that the government does not hold sway over judges' decisions".

Eye on elections

Ong Kian Ming, a lecturer at UCSI University in Kuala Lumpur, said the prime minister, Najib Razak, would probably push ahead with more democratic reforms in the coming months to keep up the momentum. 

All talk is now centred on the upcoming elections. Khairy Jamaluddin, head of the Youth Wing of the ruling Malay party UMNO, described the Anwar Ibrahim sodomy trial as a hurdle the government had to get through.

"We categorically deny charges that the case was politically motivated," he said.

"It was a private matter. We are glad to see the back of the court case. We did not want this to happen. It was a complaint from a private individual. Today we are very much focused on the general election."

A verdict that can be spun for the benefit of both the government and the opposition. The next general election is anyone's for the taking.