A case that has been wending its way through Belize’s court system ended today when the country’s Supreme Court ruled that a law punishing homosexuality is illegal. The LGBT group Unibam brought the court challenge.

The Central American nation started as a British colony and the law was a leftover from that era. The plaintiffs hope the case will bolster support for LGBT rights in nearby nations who share a colonial background.

Section 53 of the Criminal Code criminalized consensual sex between two people of the same gender. The court found the provision was unconstitutional.

The main plaintiff in the case, Caleb Orozco, told Buzzfeed News that the court ruled in his favor on privacy grounds and under protections of “dignity, equality, and freedom of expression.”

According to the Belize News, Chief Justice Kenneth Benjamin also acknowledged the health benefits of striking down the law, saying it prevented gay men from being tested and treated for HIV.