Opponents of same-sex marriage object, often strenuously, to comparisons with interracial marriage. Homosexuality is a behavior rather than a trait, they contend, and men and women of different races are sexually compatible in a way that same-gender couples are not.

All analogies are inexact. But for practical purposes, whether the comparison holds up in every possible regard matters less than whether it holds up in legal terms. And from that perspective, the comparison is proving powerful indeed. So far six federal judges have ruled against state restrictions on gay marriage, and every one of them has invoked Loving v. Virginia — the 1967 case in which the Supreme Court struck down Virginia’s ban on interracial marriage.

Defenders of bans on same-sex marriage have appealed to tradition — i.e., old habit. That’s an awfully weak argument, given our history. Slavery was traditional. Denying women the vote was traditional. So was a lot of gun control.

Federal Judge Arenda Wright Allen certainly didn’t buy the argument when she ruled against Virginia’s ban.

Wright Allen noted that “other profound infringements upon our citizens’ rights have been explained as a consequence of heritage, and those explanations have been found wanting.” Quoting another Supreme Court case (Casey), she said interracial marriage “was illegal in most States in the 19th century, but the Court was no doubt correct in finding it to be an aspect of liberty protected against state interference by the substantive component of the Due Process Clause in Loving v. Virginia.” Elsewhere, she points out that “nearly identical concerns about the significance of tradition were presented to, and resolved by, the Supreme Court in its Loving decision.”

Last week a federal judge struck down Texas’ ban on gay marriage. Judge Orlando Garcia quotes the same passage from Casey as the one above. He goes on to say that Texas claims the debate is merely definitional: In the state’s view, “plaintiffs are seeking recognition of a ‘new right to same-sex marriage’ as opposed to the existing ‘right to marry.’ This Court finds this argument fails, as the Supreme Court did not adopt this line of reasoning in the analogous Loving v. Virginia. Instead of declaring a new right to interracial marriage, the Court held that individuals could not be restricted from exercising their ‘existing’ right to marry on account of their chosen partner. . . . That is, an interracial marriage was considered to be a subset of ‘marriage,’ in the same way that same-sex marriage is included within the fundamental right to marry.”

Moreover, “this fundamental right to marry also entails the ability to marry the partner of one’s choosing. See generally Loving. . . .”

The question in Kentucky was slightly different: Whether that state was obliged to recognize the same-sex unions validated by other states. Nevertheless, it also referred to Loving as the basis for concluding that “marriage is a fundamental right.” And that state “laws are subject to the guarantees of individual liberty contained within the United States Constitution.” And that “the Supreme Court has refused to allow mere tradition to justify marriage statutes that violate individual liberties.”

A similar ruling requiring Ohio to recognize out-of-state same-sex marriages also cited Loving more than a half-dozen times. And when he struck down Oklahoma’s ban on gay marriage, federal judge Terence C. Kern noted that “in discussing [the] traditional state authority over marriage, the Supreme Court repeatedly used the disclaimer ‘subject to constitutional guarantees.’ . . . (citing Loving v. Virginia. . . .) A citation to Loving is a disclaimer of enormous proportion.”

Apparently so.

Courts — including the Supreme Court — can be wrong. Sometimes egregiously so. But there is a reason so many courts have referred to Loving again and again: The arguments for laws banning gay marriage and the arguments for laws banning interracial marriage are nearly identical: Tradition. States’ rights. Government’s presumed interest in the ordering of private relationships for the sake of an ostensible public good.

Those arguments did not hold up in 1967, and they don’t hold up now. Government’s core purpose consists of protecting people from harm they don’t consent to. The trouble confronting opponents of gay marriage, like opponents of interracial marriage before them, is that they can produce nobody whose rights have been violated by somebody else’s marriage. The only things ostensibly harmed by gay marriage are inchoate entities such as “society” and “tradition” and “the institution of marriage.” And those simply are not sufficient reasons to infringe on someone else’s fundamental liberty.

This article originally appeared in the Richmond Times-Dispatch.