Costa Rican lawmakers passed a bill on Monday that may have accidentally approved same-sex unions.

It was after they voted to change a bill which previously only recognised legal partnerships as between a man and a woman.

The new bill now recognises: “The right to recognition without discrimination contrary to human dignity, social and economic effects of domestic partnerships that constitute publicly, notoriously unique and stable, with legal capacity for marriage for more than three years”

Lawmaker Manrique Oviedo, who previously opposed same-sex unions, has urged President Laura Chinchilla to veto the bill, stating that he “feels deceived” and “he made a mistake” when he voted for it.

Deputy Justo Orozco said the case would have to be looked at carefully because “you can’t give rights to those who don’t deserve them.”

Last year, the vice presidents of Costa Rica, Alfio Piva and Luis Liberman said in an interview that gay couples deserve the same rights as heterosexuals, though they stopped short of endorsing equal marriage.

In 2010, Costa Rica’s Supreme Court ruled against allowing a referendum on whether gay couples should be permitted to have civil unions.

According to the lawmaker José María Villalta, the approved bill establishes the right to the recognition of same-sex unions “without discrimination contrary to human dignity”.

He also told La Nación that “politicians approve projects without reading them through,” and that the bill’s passing would “open the door for recognising the rights of same-sex unions.”

If the bill passes Costa Rica would join the five Latin American countries that have approved same-sex unions. Brazil was the most recent to do so on 14 May 2013.