Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

A federal judge on Tuesday upheld Puerto Rico's same-sex marriage ban, ruling that last year's landmark Supreme Court decision on marriage rights doesn't necessarily apply to the unincorporated territory.

The U.S. Supreme Court's June decision in Obergefell v. Hodges requires all states to issue marriage licenses to gay couples and to recognize same-sex marriages performed in other jurisdictions.

The Morning Rundown Get a head start on the morning's top stories. This site is protected by recaptcha

But in his decision on Tuesday, U.S. District Court Judge Juan Pérez-Giménez said that the Obergefellruling doesn't necessarily include Puerto Rico.

"One might be tempted to assume that the constant reference made to the 'States' in Obergefell includes the Commonwealth of Puerto Rico," Pérez-Giménez wrote in his decision. "Yet, it is not the role of this court to venture into such an interpretation."

The judge based his ruling on Puerto Rico's status as an "unincorporated territory" that "is not treated as the functional equivalent of a State for purposes of the Fourteenth Amendment."

Therefore, Pérez-Giménez concluded, the U.S. Constitution applies only in part to a territory like Puerto Rico.

"Under this doctrine, 'the Constitution applies in full in incorporated Territories surely destined for statehood but only in part in unincorporated Territories.'" he wrote.

The judge upheld the same ban in October 2014. That decision was challenged in light of Obergefell, but Pérez-Giménez denied the motion.

His latest ruling will likely be appealed.