A Malaysian court has begun hearing a government appeal against the sodomy acquittal of opposition leader Anwar Ibrahim.

A high court in 2012 found Anwar not guilty of having sex with a man who was then his aide, ruling DNA evidence was contaminated.

Sodomy is punishable by up to 20 years in prison under a colonial-era law in Malaysia.

The 66-year-old former deputy prime minister says the charges are an attempt by the government to ruin his political career.

It is not clear whether a verdict will be delivered before March 23, when Anwar will contest a seat in by-elections.

Many expect the veteran politician to win the seat, which would likely allow him to run Selangor, the country's most populous state.

Anwar says fraud by Prime Minister Najib Razak's ruling National Front coalition kept his Pakatan Rakyat alliance from winning last year's election.

The government disputes the charge and says it is not pursuing the sodomy charges against Anwar for political reasons.

Thursday's appeal hearing had been delayed many times, due to Anwar's insistence that the government's lawyer was biased against him.

Many rights groups agree with Anwar that the charges are politically motivated. In a statement Thursday, Human Rights Watch said Thursday's hearing makes it clear the government is "determined to remove Anwar from the political scene by hook or by crook."