Gay rights activists and supporters of marriage equality celebrated in Costa Rica and throughout Latin America Tuesday night after the Inter-American Court of Human Rights ruled that all of its signatory countries must allow same-sex marriage.

The court’s verdict is binding for most Latin American states – some of which still hold traditionalist views opposing such unions. Costa Rica’s legislation does not currently permit same-sex marriage, although there is recognition of economic and property rights for same-sex couples.

The decision, published Tuesday, was in response to a motion lodged by Costa Rica in May 2016. It sent approximately 300 Costa Ricans to the Fuente de la Hispanidad in San Pedro, just east of the capital, to celebrate the ruling, according to the daily La Nacion.

States that are signatories to the American Convention on Human Rights adopted in 1969 are required to adhere to the court’s rulings.

Several of them already do recognize same-sex marriage, including Argentina, Brazil, Colombia and Uruguay. Others, such as Chile and Ecuador, currently recognize same-sex civil unions but not marriages. And some countries, such as Bolivia, Paraguay and Peru acknowledge neither.

Venezuela, which does not recognize same-sex marriage, has withdrawn from the convention.

The United States and Canada, although part of the Organization of American States that the Inter-American Court of Human Rights is part of, have not ratified the convention, but both accept same-sex marriages.

The ruling from the Costa Rica-based court said gay married couples should have the same rights as heterosexual ones existing under each country’s laws. As such, it said it is inadmissible and discriminatory for a separate legal provision to be established just for gay marriages.

The court acknowledged that some states would face institutional difficulties in bringing in the right for same-sex couples to marry, noting that often opposition was based on religious criteria; many Latin Americans identify as Catholic.

But the court said that “in democratic societies, there should exist mutually peaceful coexistence between the secular and the religious,” with neither interfering with the other.

How will the country’s presidential candidates react? La Nación consulted eight candidates, all of whom said they would respect the ruling with two exceptions: Mario Redondo of the Democratic Christian Alliance, and Fabricio Alvarado of the National Restoration Party.

Edgardo Araya, the candidate representing the left-wing Broad Front party, published an exuberant video on Facebook.

“This is a historic day for our nation,” he said. “Today we celebrate, at long last, the recognition of equal marriage in our country.”