A Malaysian court has convicted opposition leader Anwar Ibrahim of sodomy, upholding a government appeal against his acquittal two years earlier in a ruling his supporters said was politically influenced and aimed at ending his career.

The court of appeal ruled that Anwar had sodomised his male aide in 2008, a crime in the country, dismissing his defence team's argument that DNA evidence had been contaminated, according to a Reuters news agency report. 

Anwar's lawyers are expected to appeal against the ruling at the country's highest court and win a stay of the sentence, but the judgment could affect his plans to run for election in a local state seat this month.

International human rights groups have condemned the legal moves against Ibrahim as politically motivated. 

Anwar is the most potent threat to the government of Prime Minister Najib Razak, whose popular support has weakened over the last two elections. 

Media reports said the court would soon announce a sentence against Ibrahim, according to an Associated Press news agency report. 

He had previously been sentenced to six years in jail but was released on appeal in January 2012.

That election could pave the way for him to take charge of Selangor, Malaysia's richest and most populous state.

Following the decision, a Malaysian government spokesperson said: "Malaysia has an independent judiciary and the judges will have reached their verdict only after considering the evidence in a balanced and objective manner."

Source: Agencies