Botswana has formally repealed sections of its penal code criminalising same-sex relations, in a rare advance for LGBTQ rights in Africa. But several governments elsewhere on the continent are introducing harsher penalties for same-sex relationships.
On 17 May 1990, the World Health Organization removed homosexuality from its list of mental illnesses and since then many countries mark International Day Against Homophobia, Biphobia and Transphobia on that day each year.
While much of the African continent remains hostile terrain for LGBTQ people, campaigners in Botswana say a years-long legal battle has begun to bear fruit.
In 2019, Botswana's High Court ruled that laws criminalising same-sex relations were unconstitutional and the penal code was formally amended in March this year.
Follow us on WhatsApp | LinkedIn for the latest headlines
"We welcome with joy the decision by the government's legal representative to formally repeal these sections of the penal code," says Nozizwe Ntesang, head of the rights group Legabibo.
"It's encouraging for us, because this new government has clearly shown, from the beginning, that it stands on the side of human rights - rights which by definition concern everyone and therefore include LGBT people," she told RFI's Claire Bargelès.
The legislation was passed despite opposition, backed by some religious groups.
Ntesang credits Botswana's courts, as well as years of lobbying and dialogue with religious leaders, in overcoming opposition to same-sex relationships.
"I think Botswana is fortunate to have a strong judicial system, independent, and capable of examining human rights issues," she said.
"These robust institutions, together with advocacy work and the possibility of engaging with partners such as religious representatives - all this helps explain these advances in Botswana, and I hope other countries and civil societies will manage to do the same, and begin dialogue around their local legislation."
Senegal toughens penalties
Elsewhere on the continent, several governments are going in the opposite direction.
In Senegal, a new law adopted in March doubled prison sentences for what the authorities describe as "acts against nature". Same-sex relations, previously punishable by between one and five years in prison, now carry sentences of five to 10 years.
On Thursday, France said it was "concerned" by the tougher penalties introduced in Senegal and by new offences linked to so-called "promotion" of homosexuality which could affect organisations or activists campaigning for LGBTQ+ rights.
There have been several arrests since the new legislation was introduced. On 10 April, a court in Dakar sentenced a young Senegalese man to six years in prison after he was caught having sex with another man in the suburbs of the capital.
In a separate case, a French engineer in his thirties living in Dakar has been held since February. He faces charges including "acts against nature", criminal conspiracy, money laundering and attempted transmission of HIV.
France says consular officials have visited him four times in detention.
Senegal doubles jail terms for same-sex relations amid crackdown
Nationalist rhetoric
Ghana's parliament has passed a bill introducing harsher criminal penalties and encouraging people to report suspected homosexual activity, although the legislation has not yet been promulgated.
Burkina Faso and Mali have also tightened their laws.
Ghana activists denounce new bill that makes identifying as LGBTQ+ a crime
Rights groups say religious pressure and outside influence - from both American evangelical networks and Russia - have made their work increasingly difficult.
A Reuters investigation found that the US pro-family group MassResistance, known for its anti-LGBT+ stance, has helped the Senegalese collective And Samm Jikko Yi ("together, let us preserve our values"), which championed the law passed in mid-March.
Human rights groups also point to nationalist rhetoric, which claims that homosexuality is imported from the West, is increasingly being invoked to bolster homophobic discourse, in a bid to gain popular support.
"Governments and politicians use LGBT+ people as scapegoats," says Alex Müller, director of the LGBT+ Rights Programme at Human Rights Watch. "This helps divert attention away from their potential failures," she told Le Monde.
According to France's equality watchdog (Observatoire des Inégalités), 31 African countries still criminalise homosexuality.
In some cases, the death penalty remains on the statute books, including in Mauritania, Nigeria, parts of Somalia and Uganda.
Uganda introduced some of the world's harshest anti-LGBT legislation in 2023, with potential life imprisonment for same-sex relations and the death penalty for "aggravated homosexuality" such as relationships under duress, involving a minor or a parent.