Puerto Rico on Friday announced that it would no longer defend in court a law that limits marriage to heterosexual couples and prohibits the recognition of the marriages of gay and lesbian couples performed elsewhere.

Justice Secretary Cesar Miranda announced the reversal.

“The decision recognizes that all human beings are equal before the law,” Miranda said in a statement. “We believe in an equal society in which everyone enjoys the same rights.”

Last year, a federal judge upheld Puerto Rico's ban, saying that allowing such unions could lead to plural and incestuous marriages. Plaintiffs in the case, three couples who want Puerto Rico to recognize their marriages and two couples who wish to marry in the territory, appealed the decision to the First Circuit Court of Appeals, which includes under its jurisdiction five states which allow gay couples to marry, plus Puerto Rico.

Friday was the last day that Puerto Rico had to file its response in the case.

“Because Puerto Rico's marriage ban impermissibly burdens Plaintiffs' rights to the equal protection of the laws and the fundamental right to marry, we have decided to cease defending its constitutionality based on an independent assessment about its validity under the current state of the law,” lawyers representing the state said in their brief.

Governor Alejandro Garcia Padilla, a Democrat and a defendant in the case, has previously stated his opposition to marriage equality.

“Everyone knows my religious beliefs but political leaders should not impose their beliefs,” the 43-year-old practicing Catholic said in a statement Friday.