Malaysia's opposition leader Anwar Ibrahim was acquitted by the country's High Court today of a sex offence against a former aide, citing unreliable DNA evidence.
The verdict surprised supporters who saw the case as an attempt to sideline him.
Mr Anwar has long maintained that prime minister Najib Razak's ruling coalition concocted the sodomy charge to damage his chances of leading the opposition to an election victory.
Mr Najib, who is expected to call for national elections some time this year, denies plotting against Mr Anwar.
His 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 evidence by Mr Anwar's 26-year-old accuser, Saiful Bukhari Azlan, and semen samples found on Mr Saiful's body that investigators said matched Mr Anwar's DNA.
But 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% certainty exclude the possibility that the (DNA) sample is not compromised," he 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 Mr Anwar's supporters shouted "Allahu Akbar", or "God is great", after the judge finished reading the verdict. Members of his family burst into tears and hugged him.
"Thank God justice has prevailed," a jubilant Mr Anwar told reporters. "I have been vindicated. To be honest, I am a little surprised."
Mr Anwar, whom the opposition regards as its future prime minister if it wins federal power, had earlier said he was braced for a conviction, which could result in a maximum of 20 years in prison.
The verdict is expected to have a major impact on general elections that most politicians believe will be held some time this year. Mr 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 the acquittal "proves that the government does not hold sway over judges' decisions".
"Malaysia has an independent judiciary," he said. "The current wave of bold democratic reforms introduced by (Mr Najib) will help extend this transparency to all areas of Malaysian life."
At least 5,000 opposition supporters gathered outside the court in Kuala Lumpur, chanting "Long live the people". Some carried banners that read "Free Anwar" and "Reject slander".
A police helicopter flew over the court, while riot police backed by a truck mounted with a water cannon monitored the crowd amid concerns that a conviction might spark unrest in Malaysia's largest city.
Defence lawyers had insisted Mr Saiful's testimony about the alleged sodomy at a Kuala Lumpur condominium in 2008 was riddled with inconsistencies and that the DNA evidence was mishandled by investigators.
Mr Anwar, a former deputy prime minister and married father of six, was jailed in another sodomy case in 2000 when he was convicted of sodomising 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.
Judge Mohamad Zabidin said that without DNA evidence, Mr Saiful's word was insufficient to convict Mr Anwar.
"The court is always reluctant to convict on sexual offences without corroborate evidence," he said in an unexpectedly brief two-minute judgment. "Therefore, the accused is acquitted and discharged."
The charge emerged several months after Mr Anwar's alliance made major inroads in 2008 general elections, when the National Front ruling coalition endured its worst polling setback in more than five decades of governance.
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 corruption, racial discrimination and curbs on civil liberties. Mr 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.