A prominent gay rights activist in Zambia has been acquitted over charges of promoting homosexuality.

Paul Kasonkomona was arrested in May last year following a live television appearance in which he argued for same-sex relationships to be decriminalised as it would help in the fight against HIV.

He was charged with “soliciting for immoral purposes”.

His trial was delayed several times and Mr Kasonkomona’s lawyers always disputed the charges.

On Tuesday a magistrate found that the state of Zambia had failed to prove its case.

“The magistrate was clear: public discussion is important,” Anneke Meerkotter – a lawyer at the Southern Africa Litigation Centre, which campaigned for Mr Kasonkomona – told AFP news agency.

“This is a great victory for freedom of expression. The mood in court was one of great relief. Kasonkomona did not deserve to be arrested for expressing his opinion and the court ruling vindicates his rights.”

The ruling comes a day after Ugandan President Yoweri Museveni approved his country’s Anti-Homosexuality Bill, provoking international condemnation.

Mr Kasonkomona told AFP his acquittal was a “landmark judgment” and vowed to continue to speak out “for the rights of all Zambians”.

During the trial Mr Kasonkomona alleged that police delayed access to his HIV medication in custody and that their actions put his life at risk.

Sentences of 14 years can be issued for those convicted of same-sex sexual activity in Zambia.