"In this high-profile case, it's critical for Malaysia to apply the rule of law fairly, transparently and apolitically in order to promote confidence in Malaysia's democracy and judiciary," U.S. State Department spokeswoman Jen Psaki said in Washington.
Anwar was accused of sodomizing a male aide in 2008 but acquitted by the High Court in 2012. The government appealed that decision.
Appeals Court Judge Balia Yusof Wahi said Friday that the lower court's decision to acquit Anwar was wrong.
"We unanimously allow this appeal and set aside the decision of the High Court," he said. Anwar "is convicted and sentenced to five years' jail," he added.
The verdict sparked an uproar in the court and triggered an outpouring of support for Anwar on Twitter. Anwar's wife and children were in tears and dozens of supporters outside the court house shouted "Free Anwar."
"It is a clear signal to the people of Malaysia that they are not interested in (the country's) economic malaise ... but they are interested in killing political opponents," Anwar said, referring to Najib's government.
"They want to end Anwar's political career but they underestimated the wrath of the people," he said.
The government said in a statement that the judiciary was independent and the case was a matter for the courts, not the government, to decide.