A state judge who ruled Monday that Louisiana’s ban on same-sex marriage is unconstitutional likened the law to segregation-era prohibitions on interracial couples.

“Just a few decades ago in these United States, miscegenation was illegal. It is now something that most Americans in today’s society hardly even debate,” District Judge Edward Rubin, who is black, wrote in a ruling unsealed Tuesday.

Rubin’s decision came Monday in an adoption case involving two women in Lafayette but had been sealed from public view pending a redaction to remove the name of their minor son.

The ruling by the 15th Judicial District Court judge in Lafayette will have no immediate impact on the status of same-sex marriages in Louisiana, and the state Attorney General’s Office is appealing the decision to the Louisiana Supreme Court.

Supporters of same-sex marriage have hailed the decision as a moral and legal victory in the ongoing battle over an issue that could soon be settled by the U.S. Supreme Court.

Rubin’s decision offers an opposing judicial view in Louisiana to a ruling earlier this month by U.S. District Judge Martin Feldman, in a case out of New Orleans, upholding the state ban. The federal judge’s ruling went against the trend of federal judges in other states striking down similar bans.

Most of Rubin’s 23-page ruling in the Lafayette case is a standard review of the procedural history of the adoption proceedings and past legal rulings in state and federal courts on the issue of same-sex marriage.

But in the final pages of his decision, the judge compared laws against same-sex marriage to old bans on interracial marriage that the U.S. Supreme Court has long since struck down.

Rubin predicted views on same-sex marriage will shift much like views have changed on interracial marriage.

“Lest we forget, there was a time in America’s history when gays and lesbians were not permitted to even associate in public,” Rubin wrote. “We are past that now, but when it comes to marriage between persons of the same sex, this nation is moving towards acceptance that years ago would have never been contemplated.”

Gene Mills, president of the conservative Louisiana Family Forum, characterized Rubin’s comparison to interracial marriage bans as “personal opinion” not supported by past legal cases dealing with same-sex marriage.

“I think this decision is a minor legal aberration from an activist judge that will be corrected by the state Supreme Court,” Mills said.

The Forum for Equality Louisiana, which led the recent challenge to Louisiana’s same-sex marriage ban in federal court in New Orleans, praised Rubin’s ruling and in particular his references to Loving v. Virginia, the 1967 U.S. Supreme Court case that struck down laws banning interracial marriages. The case is often cited in arguments against bans on same-sex marriage.

“This court does not believe that the historical background of Loving is so different from the historical background underlying states’ bans on same-sex marriage,” Rubin wrote. “One cannot look at Loving without recognizing that it was about racism as well as a couple’s decision to assert their right to choose whom to marry.”

Rubin’s ruling came in an adoption case involving Angela Costanza and Chasity Brewer, who were legally married in California in 2008 and now live in Lafayette.

Costanza sought to be legally recognized as a parent to Brewer’s son, which raised the issue of the validity under Louisiana law of their out-of-state marriage.

Rubin found Louisiana’s ban on same-sex marriage violated the due process and equal protection clauses of the 14th Amendment and the U.S. Constitution’s “full faith and credit clause,” which calls for each state to recognize the laws and court decisions of other states.

The judge also declared unconstitutional a state Department of Revenue policy that barred same-sex couples from filing joint state tax returns.

The state will ask Rubin to suspend his ruling pending an appeal to the Louisiana Supreme Court, said attorney Kyle Duncan, who has been hired by the state Attorney General’s Office to handle challenges to Louisiana’s same-sex marriage ban.

“We expect our stay motion to be granted, which will mean that the judgment cannot be executed during our appeal to the Louisiana Supreme Court,” Duncan said in an email Tuesday.