Gay rights activists in Costa Rica are fighting for a right they’ve already won–by mistake.

Last week, Costa Rican legislators passed an amendment to the country’s family code meant to allow couples who have been living together for three or more years to be recognized as having a common law marriage, which would grant them the benefits of legal partners such as alimony.

This week, the language of the amendment, which was signed into law by president Laura Chinchilla, was published in the government’s official bulletin, La Gaceta, stating “recognition of the right, without discrimination…to social and hereditary benefits of civil unions.” Gay rights activists are seizing on the language, inserted by liberal lawmakers and unwittingly approved by conservative lawmakers, to pry open the door to same-sex civil unions. (Gay marriage is not legal in Costa Rica.)

Whether the law can be interpreted to support gay civil unions now depends on Costa Rica’s courts. Last week, a lawyer filed an appeal with Costa Rica’s highest court asking for legal recognition of a civil union with his boyfriend. According to the Tico Times, a Costa Rican newspaper, other couples were waiting to file their petitions until the law was published. Some legal experts doubt that the language will apply to gay civil unions given another article in the country’s family code, which says civil unions are “between a man and a woman.” Also, civil unions aside, couples of the same sex are listed as ineligible to marry in another article of Costa Rican law.

In recent years, acceptance of gay unions has been spreading across Latin America, where conservative Catholic social values have long dominated. Argentina, Uruguay and Brazil ranked high on a recent travel guide of the world’s most LGBT-friendly countries. Same-sex marriage was recently legalized in Argentina and Uruguay. Colombia, Ecuador and Brazil now recognize same-sex domestic partnerships, and gay couples can marry and adopt children in Mexico City. If gay rights activists prevail, Costa Rica will be the first Central American country to hop on the regional bandwagon.