A high court in Botswana struck down two colonial-era laws Tuesday morning that criminalized same-sex relations.

The ruling effectively legalizes gay sex, making this southern African country the first on the continent to erase that colonial legacy through its courts.

The case against the laws was brought by an anonymous gay man, identified only by the initials L.M.

“We are not looking for people to agree with homosexuality but to be tolerant,” he wrote in his deposition.

Reading the unanimous ruling of a panel of judges in front of a packed courtroom, Justice Michael Leburu said that sexual orientation “is not a fashion statement” and that the laws as they stood violated citizens’ rights to privacy and freedom from discrimination. While seldom enforced in Botswana, the laws carried the possibility of up to a seven-year jail sentence.

"It is not the business of the law to regulate the private behavior of two consenting adults,” Leburu said.

Gay sex is criminalized in more than half of African countries, many of which inherited penal codes from colonial powers such as Britain. The subject is widely seen as taboo, and discrimination and harassment are rife.

Last month, a Kenyan high court heard a similar case but dismissed it. Other countries such as Mozambique and Seychelles have simply erased mention of gay sex from their penal codes during the rewriting process that has accompanied constitutional reform. Botswana’s powerful neighbor, South Africa, is the only African country to have rights based on sexual orientation explicitly written into its constitution.

Courts in other former British colonies outside Africa have made decisions similar to that of Botswana. Leburu cited India’s ruling in 2018 as one precedent on which his own decision was built.

“It has taken a long time for our community to be where it is,” said Anna Mmolai-Chalmers, the head of Lesbians, Gays and Bisexuals of Botswana, or LEGABIBO, the most prominent of Botswana’s LGBT-rights organizations. “This incredibly life-changing decision, although it does not right all the wrongs done to individual members of the LGBT community, is a step toward restoring our dignity as human beings.”

Botswana, which is sparsely populated and home to just over 2 million people, is one of Africa’s most stable democracies. The country is scheduled to hold elections in October, which are already being hotly contested. The rights of lesbian, gay, bisexual and transgender people have not figured centrally in the campaign, but President Mokgweetsi Masisi has expressed his support for the community.

"Just like other citizens, they deserve to have their rights protected,” the president said at a December gathering.

The ruling in Botswana could provide precedent for other former British colonies to strike down identical clauses in their penal codes. The language of the ruling was unusually strong and unequivocal.

“What regulatory joy and solace is derived by the law, when it proscribes and criminalizes such conduct of two consenting adults, expressing and professing love to each other, within their secluded sphere, bedroom, confines and/or precinct?” wrote Leburu. “Any criminalization of love or finding fulfillment in love dilutes compassion and tolerance.”

This ‘kosher sex store’ is the first in the world. Its owner wants to help people ‘give sexuality more meaning.’

The Tel Aviv shop is named for the controversial, best-selling self-help book ‘Kosher Sex: A Recipe for Passion and Intimacy’

A lawmaker brought his baby to Parliament. New Zealand’s speaker rocked and fed the infant during debate.

‘Normally the Speaker’s chair is only used by Presiding Officers but today a VIP took the chair with me,’ Trevor Malloy tweeted

Trump canceled his trip to Denmark over Prime Minister Mette Frederiksen’s comments. But the two agree on one thing: immigration.

Frederiksen, who ran her campaign on an anti-immigration platform, is the country’s youngest prime minister and only the second woman