Botswana’s high court has overturned its colonial-era laws criminalizing same-sex relations, with a judge saying the country had chosen the path of “tolerance, diversity, and open-mindedness.” The court in the southern African country unanimously ruled Tuesday that its homosexuality laws—Sections 164 and 167 of Botswana’s Penal Code—were discriminatory and against the public interest. Crowds gathered in the court to hear the ruling and erupted with joy as it was read. Anna Mmolai-Chalmers, coordinator of a prominent LGBTQ rights group in the country, told CNN: “Before we were struggling. People have been hiding... This judgment can make a massive change for our lives. This is what excites me the most. The judgment means so much... The court has upheld our dignity, our privacy, and our liberty... It means freedom.” Out of 54 African countries, at least 31 have laws that make it illegal to have gay sex.