Malaysian opposition leader Anwar Ibrahim has been acquitted of sodomy following a two-year trial.
Judge Zabidin Mohamad Diah said on Monday that DNA evidence submitted by the prosecution was unreliable and discharged the case.
Mr Anwar had been accused of having sex with a former male assistant but always said the charge was politically motivated, the BBC reports.
The 64-year-old called the charges a bid by the government to cripple his political ambitions and influence. The government said the verdict showed Malaysia's judiciary was free from government influence.
Sodomy is illegal in Muslim-majority Malaysia and Mr Anwar had faced up to 20 years in prison if found guilty.
He was jailed for sodomy in 2000 after being sacked as deputy prime minister, but the conviction was later overturned.
The current allegations surfaced after elections in 2008 in which he led the opposition to its biggest electoral victory.
Monday's verdict comes ahead of elections due in 2013 but widely expected to be called later this year. The governing party has been in power for over 50 years.
Mr Anwar is now seen as the key figure in Malaysia's opposition coalition, which currently controls about a third of the seats in parliament.
In a tweet from his account minutes after the verdict, he said he looked ahead to the polls.
Hundreds of police and security personnel were on the streets of Kuala Lumpur and thousands of Mr Anwar's supporters cheered outside the court following the verdict.