The movement for marriage equality yesterday received its greatest legal victory. Judge Richard Posner, of the U.S. Court of Appeals for the Seventh Circuit, wrote a powerful opinion ordering Indiana and Wisconsin to recognize same-sex marriages. In the process, he eviscerated the states' efforts to defend their discriminatory laws.

The author matters in this case. Posner was appointed by Ronald Reagan, and he isn't known for favoring an active judicial role or for thinking that courts should promote social change. He is also widely admired, and probably counts as the most influential lower court judge of the past 50 years. When he speaks, people listen.

To understand his opinion, it is important to distinguish among three quite different objections to laws forbidding same-sex marriage.

The first is that they interfere with the right to marry. On this view, under the Constitution's due process clause, that right is fundamental, so states can't interfere with it without a "compelling justification" (for example, to prevent marriages between parents and children).

The second is that because gays and lesbians have been subject to pervasive prejudice and hostility, and because sexual orientation is immutable, any form of discrimination against them is "suspect" under the equal protection clause -- which means, again, that it can't be allowed without a compelling justification.

The third, and simplest, argument is that laws against same-sex marriage lack any reasonable basis, so they violate the equal protection clause for being "irrational."

Judge Posner embraced the second argument, but in the end, his opinion rested on the third.

Indiana offered just one rationale for limiting marriage to opposite-sex couples: essentially, that marriage is meant to enhance the welfare of children by reducing the risk that, in cases of "accidental births," men will avoid taking responsibility for them. Marriage, Indiana argued, channels "unintentionally procreative sex" into a legal relationship, in which the biological father is required to assume responsibility. Because same-sex relationships can't produce accidental births, there is no reason for marriage.

Posner had a field day with that argument. "Heterosexuals get drunk and pregnant, producing unwanted children; their reward is to be allowed to marry. Homosexual couples do not produce unwanted children; their reward is to be denied the right to marry. Go figure."

Indiana's argument was undermined by the fact that the state allows infertile couples to marry. Indeed, it allows first cousins to marry if they are over 65-years-old, apparently because by that age, women are infertile.

If Indiana really wanted to address the problem of accidental births by ensuring that children are in stable homes, Posner added, it should promote, rather than forbid, same-sex marriages. After all, same-sex couples adopt children, and the state already presumes that children's prospects are improved when their parents are married.

Wisconsin, for its part, emphasized that its prohibition was the product of the democratic process (a popular vote). Posner's response was crisp: "Minorities trampled on by the democratic process have recourse to the courts; the recourse is called constitutional law."

Wisconsin pointed as well to tradition, but in Posner's view, a tradition is a fact, not a justification. Wisconsin added that it wanted to "go slow," because same-sex marriages might transform a "cornerstone of civilization and society." But the state provided no evidence, or any reason to believe, that allowing such marriages would transform anything.

Posner emphasized that forbidding same-sex couples from marrying "imposes a heavy cost, financial and emotional, on them and their children." In the most original part of his opinion, he turned the child-welfare argument on its head: "By denying marital rights to same-sex couples it reduces the incentive of such couples to adopt unwanted children and impairs the welfare of those children who are adopted by such couples."

Posner's opinion is uncharacteristically lengthy, but its most memorable words are just two: "Go figure." With each decreasingly plausible effort to defend prohibitions on same-sex marriages, that may remain the best response.

This column does not necessarily reflect the opinion of Bloomberg View's editorial board or Bloomberg LP, its owners and investors.