A federal judge on Monday ruled against plaintiffs challenging Puerto Rico's ban on same-sex marriage, saying that the Supreme Court's ruling does not apply in the territory.

U.S. District Court Judge Juan Perez-Gimenez said in his 10-page ruling that the high court's ruling in Obergefell v. Hodges does not automatically apply to Puerto Rico because it is an unincorporated territory.

In October 2014, Perez-Gimenez upheld Puerto Rico's marriage ban. Plaintiffs appealed to the First Circuit Court of Appeals.

After the Supreme Court ruled in Obergefell, the First Circuit sent the case back to the district court “for further consideration in light of Obergefell v. Hodges.” In returning the case to the lower court, the appeals court called the ban “unconstitutional.”

Plaintiffs in the case are represented by Lambda Legal.

In comments to BuzzFeed News, Lambda Legal attorney Omar Gonzalez-Pagan called the ruling “aberrant and fundamentally flawed.”

“The U.S. Supreme Court has unequivocally stated that the constitutional promises of liberty and equality apply with equal force to residents of Puerto Rico, and the U.S. Court of Appeals for the First Circuit was clear when it stated that Puerto Rico's marriage ban was unconstitutional,” he said.

Plaintiffs are expected to appeal the case to the First Circuit.