An unexpected ruling from a federal judge in Puerto Rico is raising doubts about the future of same-sex couples seeking to get married on the island.

Judge Juan Perez-Gimenez found that a U.S. Supreme Court ruling that allows gay couples to marry anywhere in the United States does not apply on the island because it is a U.S. territory and not a state. Lambda Legal attorney Omar Gonzalez said Wednesday that the judge's ruling is erroneous and that the group will seek to have it vacated as soon as possible.

Gonzalez said it is unclear if Puerto Rico's government will stop issuing marriage licenses because of Tuesday's ruling. A spokeswoman for Gov. Alejandro Garcia Padilla did not immediately return a message seeking comment.