Costa Rica’s Supreme Court ordered deemed banning same-sex marriage as unconstitutional.

As a result of the ruling, the country’s legislature has 18 months to legalize it through implementing law changes, according to PinkNews. If not, same-sex marriage will become legal automatically anyway, since the current ban will no longer be in effect.

Costa Rican President Carlos Alvarado Quesada was open to the law and stated his intended encouragement for its implementation.

“Our commitment to full equality of rights remains intact,” he said in a statement. “We trust that respect for human rights and the rule of law will prevail, whether the Legislative Assembly recognizes equal marriage in the next 18 months, or failing that, once the time limit expires and the current law is made invalid.”

Many of the country’s lawmakers are evangelical and strongly oppose same-sex marriage, but the president’s pressing to implement a new law may push back against their opposition.

“We will continue to boost actions that guarantee no person will face discrimination for their sexual orientation or gender identity,” he added.