US District Court Judge Juan Pérez-Giménez, who decided earlier this year that Puerto Rico should maintain it gay marriage ban, has been overruled by the federal appeals court which stated that the ban was “unconstitutional”.

“The district court’s ruling errs in so many respects that it is hard to know where to begin,” the unsigned opinion from the 1st Circuit Court of Appeals stated in in a harsh criticism of Pérez-Giménez.judge

According to a Buzzfeed report, Pérez-Giménez had ruled in favour of the ban in October 2014, but the 1st Circuit sent the case back to the trial court after the Supreme Court’s

June 2015 ruling in Obergefell v Hodges striking down marriage bans nationwide.

The appeals court ordered Pérez-Giménez to “further consider” the matter “in light of Obergefell,” adding that the appeals court judges “agree with the parties … that the ban is unconstitutional.”

Nonetheless, in March, Pérez-Giménez upheld the ban for a second time, ruling that the Supreme Court’s ruling does not apply to a territory like Puerto Rico.

The appeals court disagreed strongly, stating, “In ruling that the ban is not unconstitutional because the applicable constitutional right does not apply in Puerto Rico, the district court both misconstrued that right and directly contradicted our mandate.”

The appeals court granted the request from the parties challenging the ban that the appeals court issue an order “requiring the district court to enter judgment in their favor striking down the ban as unconstitutional.” The appeals court also took the extraordinary step of kicking Pérez-Giménez off the case, ordering that the case “be assigned randomly by the clerk to a different judge to enter judgment in favor of the Petitioners promptly.”

The matter was before 1st Circuit Judges Juan Torruella, Ojetta Rogeriee Thompson, and William Joseph Kayatta Jr. The opinion, however, was issued per curiam, meaning, “by the court” – as in, it was not signed by any of the judges in particular.

Puerto Rico officials agreed with the parties challenging the ban that Puerto Rico’s ban is unconstitutional since the Obergefell decision.

On May 29, 2016, Puerto Rico Governor Alejandro García Padilla signed into law civil-rights measures that give LGBT people on the Caribbean island non-discrimination protections and also incorporate same-sex couples into its domestic-violence law.