Botswana’s Court of Appeal on Monday upheld a 2019 ruling that decriminalised gay sex, a decision hailed by the gay community as establishing the southern African country as a “true democracy”.

The decision in effect struck off two sections of the penal code that had outlawed homosexuality. Before the 2019 High Court ruling, engaging in gay sex in Botswana was punishable by up to seven years in prison.

Reading the unanimous decision by five judges, Court of Appeal Judge President Ian Kirby said the criminalisation of consensual same-sex activities violated the Constitution and rights of lesbians, gay people, bisexuals and transgender persons to dignity, liberty, privacy and equality.