A judge has sentenced a well-known gay Senegalese journalist to four years in prison for breaking the country’s anti-gay laws, illegal possession of arms and battery charges.

Tamsir Jupiter Ndiaye’s lawyer said he is surprised by the court’s decision and that it is not based on the rule of law.

Speaking on Senegalese Radio, Khassimou Touré, criticised the judgement and said: “I am surprised, disgusted, and utterly dismayed by this dramatic decision.

“Today the court passed a moral judgement not a legal one”.

He added: “This decision has no place in our judicial system. It follows and is based on public outrage, and the media which inflamed public opinion and played judge and jury.”

According to the Associated Press, Mr Ndiaye plans to appeal.

Mr Ndiaye was arrested on 10 October after getting into a fight with his male partner.

The court said that Mr Ndiaye used a knife and stabbed his partner in the stomach.

Senegal, a conservative mainly Muslim country in the north west of Africa, outlaws same-sex relations.

Earlier this year, Human Rights Watch called on Senegal’s President Macky Sall to implement protections for the country’s LGBT citizens.

They also urged for the repeal of anti-gay laws.

Mr Ndiaye’s partner has also been sentenced to two years in prison.