Foes of gay marriage — a shrinking cohort — do not like comparisons to interracial marriage. The reason is obvious: Everyone now recognizes that prohibitions against interracial marriage, which the Supreme Court struck down in the aptly named Loving v. Virginia, were completely irrational and thoroughly unjust. If the analogy with gay marriage is valid, then that debate is over.

It probably is anyway. But its demise could be hastened by federal District Judge Robert Shelby’s ruling against Utah’s amendment forbidding gay marriage, which invokes Loving time and again.

Utah’s marriage amendment parallels Virginia’s in many ways. Utah passed a law forbidding gay marriage in 1977, two years after Virginia did. In 2004, both states then doubled down by passing additional measures foreclosing the possibility of civil unions or other approximations of gay marriage. Utah then passed a constitutional amendment forbidding gay marriage that took effect in 2005. Virginians approved the commonwealth’s amendment the next year.

Shelby — an alumnus of U.Va. Law — notes that the developments in Utah were “influenced by a number of events occurring nationally,” including cases legalizing gay marriage in Vermont and Massachusetts. During debate over Virginia’s amendment, Republican Del. Bob Marshall decried “attempts to radically alter an institution that must antedate history. And this has come about by social engineering judges in Massachusetts, Vermont, and elsewhere.”

Arguments like that ring with historical echoes. “Almighty God created the races white, black, yellow, malay and red, and he placed them on separate continents,” decreed Leon Bazile, the judge who convicted Mildred and Richard Loving. “And but for the interference with his arrangement there would be no cause for such marriages.” God made Adam and Eve, not Adam and Steve.

Gay-marriage foes object that gender is central to procreation in a way race isn’t. This is true, but it ignores the legal parallels between gay marriage and racial intermarriage. Those parallels should especially trouble anyone who believes in limited government. Asking why gays should be allowed to marry asks the wrong question. The right question is: Why should government stop them?

Marriage, as Shelby observes, is a fundamental right — so fundamental that even prison inmates retain the right, despite their “reduced expectation of liberty” and the unlikelihood of jailhouse weddings producing offspring. Why then should a state deny free gays and lesbians a right it affords to inmates?

Defenders of Utah’s Amendment 3 respond that gays and lesbians enjoy the same right to marry as everyone else: the right to marry persons of the opposite gender. But the right to marry entails a right to choose whom you marry. If it didn’t, then the state could pick your spouse for you: “A person’s choices about marriage,” Shelby writes, “implicate the heart of the right to liberty.”

Utah’s defenders claim the amendment does not discriminate because it applied to men and women equally. But as Shelby notes, “The Supreme Court rejected an analogous argument” in Loving: “Virginia argued that its anti-miscegenation laws did not discriminate based on race because the prohibition against mixed-race marriage applied equally to both white and black citizens.”

Like Utah, Virginia claims same-sex marriage is not a fundamental right, but rather a new kind of right “first recognized in this country [only] a decade ago.” Shelby finds this argument unpersuasive: “The Supreme Court did not adopt this line of reasoning in” Loving: “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 the race of their chosen partner. ... This right is ... implicit in the concept of ordered liberty because it protects an individual’s ability to make deeply personal choices about love and family free from government interference. ... Both same-sex and opposite-sex marriage are therefore simply manifestations of one right — the right to marry — applied to people with different sexual identities.”

Like Utah, Virginia argues that traditional marriage is the optimal arrangement for child-rearing — that the traditional definition of marriage is hallowed by time as “the ideal ordering of human relationships.”

Well. Set aside for the moment the profoundly authoritarian implications of assuming that “ordering ... human relationships” is any part of government’s job. And that government can be trusted to know what is “ideal” and “optimal.” And that it should seek to enforce its vision of what is “ideal” rather than simply protect individuals’ liberty to pursue their own happiness as they define it.

Even if you accept such premises, Shelby notes that there is no evidence to think prohibiting gay marriage achieves any of the prohibition’s ostensible aims: “The court’s focus is not on whether extending marriage benefits to heterosexual couples serves a legitimate governmental interest.” Rather, “courts are required to determine whether there is a rational connection between the challenged statute and a legitimate state interest.”

Virginia had an interest “in providing marriage to same-race couples,” Shelby noted, but “Virginia’s exclusion of interracial couples from marriage” had no bearing on that interest. Likewise, prohibiting marriage by gay couples has no effect on how many straight couples marry or have children: “In an amicus brief submitted to the Ninth Circuit Court of Appeals by the District of Columbia and fourteen states that currently permit same-sex marriage, the states assert that the implementation of same-sex unions in their jurisdictions has not resulted in any decrease in opposite-sex marriage rates, any increase in divorce rates, or any increase in the number of nonmarital births.”

In short, supporting straight marriage does not require stifling gay marriage. The only remaining reasons to stifle it, then, are reasons government cannot embrace: a desire to preserve the traditional institution of marriage and to express moral disapproval of homosexuality. But preserving tradition and expressing disapproval are not valid grounds for circumscribing individual rights.

Virginia’s arguments in Loving, Shelby concludes, “are almost identical to the assertions made by the State of Utah in support of Utah’s laws prohibiting same-sex marriage. ... Anti-miscegenation laws in Virginia and elsewhere were designed to, and did, deprive a targeted minority of the full measure of human dignity and liberty by denying them the freedom to marry the partner of their choice. Utah’s Amendment 3 achieves the same result.”

So does Virginia’s marriage amendment. That is why the challenge to it could become a reprise of the Loving case — whether its defenders like that or not.

This column originally appeared in the Richmond Times-Dispatch.