The Costa Rica Supreme Court on Wednesday formally released its ruling that says lawmakers have 18 months to extend marriage rights to same-sex couples.

“Acts of open discrimination, whether they are expressed or implied, cannot be justified in any way in a democratic society that respects fundamental rights,” reads the ruling.

The Inter-American Court of Human Rights, which is based in the Costa Rican capital of San José, in January issued a landmark ruling that recognized same-sex marriage and transgender rights.

Then-Costa Rican Vice President Ana Helena Chacón announced her government was going to comply with the ruling. Carlos Alvarado, who was elected president of Costa Rica in April, publicly supports marriage rights for same-sex couples.

The Supreme Court in August ruled a law that prohibits same-sex marriage in the country is unconstitutional. The deadline for lawmakers for act on the issue had not been established because the ruling had not been formally released.

Costa Rican media reports indicate the ruling will take effect in 2020 if lawmakers fail to act.

“We are analyzing in detail the hundreds of pages that make up this ruling,” Margarita Salas, a Costa Rican LGBTI activist who previously ran for the country’s National Assembly, told the Los Angeles Blade on Wednesday. “This is a fundamental step in continuing the fight for the human rights for LGBTI people in Costa Rica.”

Costa Rica is poised to become the first country in Central America to extend marriage rights to same-sex couples.

Anti-LGBTI attitudes remain commonplace in Costa Rica, even though there are several gay-friendly resort areas throughout the country. The Supreme Court formally issued its ruling against the backdrop of outrage over the murder of Stephanie Paola Castro Mora, who was found dismembered in the wealthy San José suburb of Escazú last week.

A Costa Rican newspaper described Castro as “gay.”

“It is fundamental to continue with the social transformation necessary to eradicate violence and discrimination based on sexual orientation and gender identity,” Salas told the Blade.