The decision came three years and three months after the case was heard, and six years after it was filed. It strikes down Section 53 of Belize’s Criminal Code, which banned “carnal intercourse against the order of nature,” therefore primarily targeting gay and bisexual men. The law was a holdover from British colonial rule in the Central American nation, once known as British Honduras and located on the Caribbean coast.

“This is a history-making judgment for Belize, the country which I am proud to call home,” said a statement issued by Caleb Orozco, the plaintiff in the case and the executive director of the United Belize Advocacy Movement (UNIBAM), an LGBT rights group. The ruling from Chief Justice Kenneth Benjamin also says that the definition of sex under the law includes sexual orientation, paving the way for broader nondiscrimination protections.

Other activists hailed the Supreme Court’s ruling as well. “This is a momentous victory for Belize, and I congratulate the LGBTQ advocates of Belize as well as the countless legal experts and supporters who fought for this win,” said Ty Cobb, director of the Human Rights Campaign’s global arm, in a press release.

“We are thrilled for our partners at UNIBAM and the entire LGBT movement in Belize,” said Human Rights First’s Shawn Gaylord in a prepared statement. “This is the result of years of activism to advance the human rights of LGBT people and this ruling represents a key victory for justice and equality. Let us hope that this step may inspire neighboring Caribbean countries to also take action to end the criminalization that only serves to marginalize groups of citizens who simply seek equality and respect.” A challenge to an antisodomy law in Jamaica is pending.

While there were few convictions under the Belize law, it had the effect of stigmatizing gay men. A conviction carried a sentence of up to 10 years in prison. “Even when unenforced, Section 53 reduces gay men to the status of being ‘unapprehended criminals,’” Christopher Hamel-Smith, Orozco’s lead counsel, said in 2013, when the case was argued. “It entrenches stigma, undermines self-worth, and encourages discrimination.”

Orozco’s legal team also argued that the law made gay and bisexual men reluctant to seek out information regarding HIV or participate in scientific studies relating to the virus, an argument the court found valid.

The government of Belize can still appeal the ruling up to Caribbean Court of Justice, according to Belize Breaking News. Orozco is urging the government not to appeal the decision and also to pass legislation protecting LGBT people from discrimination.

Belize is the third nation to decriminalize gay sex this year, the HRC notes. The others are Nauru, a small island state located in the Pacific Ocean, and Seychelles, an island state in the Indian Ocean.