Two transgender Cameroonians have been sentenced to five years in prison and fined 200,000 francs ($370; £261) each.

Njeukam Loic Midrel, an internet celebrity who is known as Shakiro and Mouthe Roland, who goes by the name Patricia, were detained on 8 February for “attempted homosexuality”.

They were refused bail and their trial, which had been postponed several times, ended on Tuesday with their conviction at the Bonanjo Douala magistrate’s court.

Their lawyer, Alice Kom, on Tuesday told the BBC that the court had given the maximum sentence, which “did not take into account the fact that they are first offenders”. She said they would appeal against the judgement.

“We will continue the fight before the court of appeal. This decision risks increasing violence against LGBTQ people,” she said.

Maximillienne Ngo Mbé, the head of a human rights group, also promised to challenge Cameroon’s external partners over the court decision – saying the country “has violated all the international conventions it has signed”.

Cameroon is among 31 African countries that criminalise homosexuality. The incarceration of the two highlights the challenges faced by people in same-sex relationships in the country.

According to Human Rights Watch, Cameroonian security forces have arrested, threatened or assaulted at least 24 people since February as part of a crackdown on lesbian, gay, bisexual, and transgender (LGBT+) people.