More on GlobalPost: Top 10 International political scandals
The verdict was unexpected, and came as thousands of his supporters waited outside the court in the capital Kuala Lumpur.
Anwar, 64, had been accused of having sex with a former male aide, Mohd Saiful Bukhari Azlan, and faced up to 20 years in prison if found guilty.
In 1999, he had been jailed for sodomy, which is illegal in Malaysia, but the conviction was overturned. Anwar has long denied the charges, insisting they were politically motivated.
After the verdict, Anwar said that justice had been served, and pledged to topple the government at the country’s next election, Al Jazeera reported.
Anwar told reporters:
Thank God, justice has been served … I feel vindicated, but we still have an agenda and a struggle. We now have to focus on the general elections."
Handing down the ruling, judge Mohamad Zabidin Diah said the court did not rely on DNA evidence submitted by the prosecution in the case, which had been lodged by Azlan.
Zabidin said the court was "always reluctant" to convict on sexual offenses "without corroborative evidence."
The Malaysian Information, Communications and Culture Minister, Rais Yatim, said the decision was proof of the independence of the country’s judiciary, the Malaysian National News Agency Bernama reported.
Rais told reporters Monday:
The judgment has been made, and with this, it is proven that the country's judiciary is reputable, and its judgments are on par with those made in the developed countries, which are based on the rule of law."
Rais also said the verdict was evidence that no person was above the rule of law in Malaysia.