Alabama Chief Justice Roy Moore is making the media circuit rounds this week defending his decision to keep the state's same-sex marriage ban after a federal judge struck it down, arguing that the federal government and courts should not be able to alter the state's definition of marriage.

"No judge of the United States or federal district court has the right to invent the definition of marriage, which is not even contained in the United States Constitution," Moore told CNN's Chris Cuomo, according to the Washington Post. "And that's the problem, we have people going in trying to mandate to the state of Alabama that the sanctity of marriage amendment in our constitution is wrong, and that's simply not right to do."

Moore may be correct that all probate judges don't have to grant same-sex marriage licenses — for now — due to technical specifics about the jurisdiction of marriage in Alabama. But he's still trying to make them carry out a same-sex marriage ban that courts have deemed unconstitutional. And his states' right argument invokes a very ugly history of discrimination when it comes to marriage.

The courts are clear: states' rights can't be used as cover to discriminate

If Moore's argument sounds familiar, it's because it was the exact same one used to defend state bans on interracial marriages half a century ago. Back then, this kind of union was prohibited in 16 states — and many, including Alabama, argued it was their state's fundamental right to set discriminatory limits against some couples.

But the argument ignored the 14th Amendment's purpose — established in part to shield people from lawful acts of discrimination enforced under the guise of states' rights. The amendment explicitly says that "no state" can deny a person due process or equal protection under the law.

In 1967, the US Supreme Court ruled in a landmark case, Loving v. Virginia, that the 14th Amendment prohibits states from discriminating against interracial couples.

"This case presents a constitutional question never addressed by this Court: whether a statutory scheme adopted by the State of Virginia to prevent marriages between persons solely on the basis of racial classifications violates the Equal Protection and Due Process Clauses of the Fourteenth Amendment," Chief Justice Earl Warren wrote in the majority opinion back then. "For reasons which seem to us to reflect the central meaning of those constitutional commands, we conclude that these statutes cannot stand consistently with the Fourteenth Amendment."

The Supreme Court's ruling was clear: states' rights can't be used as a cover to deny interracial couples their marriage rights. And federal courts are now citing that same ruling to allow same-sex marriages.

Alabama's discriminatory history with marriage

Alabama is no stranger to this aspect of marriage inequality.

In 2000, the state became the last to officially remove its interracial marriage ban from the books. The law was supposed to be unenforceable by then, thanks to the Supreme Court decision in Loving v. Virginia. But some of Alabama's probate judges still reportedly refused to grant marriage licenses to interracial couples in 1999, and nearly 41 percent of the state's voters voted to keep the ban.

In 2006, roughly 81 percent of the state's voters voted for a constitutional amendment to define marriage as a "unique relationship between a man and a woman." Moore cited the overwhelming consensus in his CNN interview as evidence his state doesn't want to legalize same-sex marriage. (A 2014 Public Religion Research Institute survey found 59 percent of Alabamians still opposed marriage equality.)

But the electorate's opinion isn't the debate here. The point of the 14th Amendment is to prohibit discrimination — even if it's popular among the electorate or legislature. Part of the courts' job is to keep laws in line with the US Constitution. That's what US District Court Judge Callie Granade tried to do when she ruled Alabama's same-sex marriage ban was unconstitutional.

Maybe same-sex marriage isn't popular in Alabama today. Maybe interracial marriage wasn't popular there in 1990. To the courts, that's not supposed to matter: if a law violates the 14th Amendment, it's unconstitutional and must be struck down.