Consider the hypothetical case of Anne, Bob, and Colin. If same-sex marriage is forbidden, Anne is allowed to marry Colin, but Bob cannot do so. This is so even if Anne and Bob are identical in every respect other than gender. Bob is denied the legal right to marry Colin (and all other men) solely because he is a man. Denial of a legal right solely on the basis of gender is the very essence of sex discrimination.

By contrast, sexual orientation actually has no effect on the way the law operates. Anne is still allowed to marry Colin, even if one of them happens to be gay or lesbian. Bob is denied that right regardless of his sexual orientation. There are actually lots of real world cases where gays or lesbians have entered into opposite-sex marriages, such as the famous example of former New Jersey Governor James McGreevey, a closeted gay man who was married to a woman for many years. McGreevey’s marriage was not illegal, even if his actions were morally dubious.

This point applies to DOMA as well. DOMA does not distinguish between marriages based on the sexual orientation of the partners. If Anne, a lesbian, is legally married under state law to Bob, a gay man, they will qualify as married under DOMA. By contrast, if two straight men enter into a same-sex marriage permitted by state law (perhaps for the purpose of qualifying for some state government benefit), DOMA forbids federal recognition of their marriage regardless of their orientation.

Obviously, both DOMA and state laws banning gay marriage do discriminate against gays and lesbians in the sense that homophobia is a major part of the motivation behind their enactment. Facially neutral laws that have the intended effect of disadvantaging a particular racial group or gender have often been invalidated by the courts. Perhaps facially neutral laws intended to disadvantage gays and lesbians should be treated the same way. But such rulings require the plaintiff to provide substantial evidence showing that the law was enacted because of hostility towards the group in question. The Second Circuit did not conduct any analysis of the motives behind DOMA. And that analysis may not be easy, given that DOMA had very broad support when enacted in 1996, including from numerous liberal Democratic members of Congress who were probably not motivated by homophobia (though they may have been catering to the prejudices of some of their constituents). Democrats voted for the law by a 118-65 margin in the House of Representatives and 32-14 in the Senate, and President Bill Clinton also supported it. It’s likely that DOMA would not have been enacted in the absence of widespread homophobic prejudice. But it may not be an easy thing to prove in court. Yet that is the relevant legal standard if facially neutral laws that allegedly discriminate on the basis of sexual orientation are going to be treated the same way as facially neutral laws that are challenged on the grounds that they discriminate on the basis of race or sex. If the facially neutral law would not have been enacted without a discriminatory motive, then it will be invalidated unless it passes the same level of heightened scrutiny as a law that explicitly discriminates on the basis of race or sex.

By contrast, as I argued here, striking down DOMA and bans on gay marriage because they discriminate on the basis of sex is much easier. Since the sex discrimination is right there on the face of the statute, there is no need for an inquiry into motive.

Sex discrimination and sexual orientation discrimination are not mutually exclusive categories. DOMA explicitly discriminates on the basis of sex, and it may well not have passed but for a widespread desire to discriminate against gays and lesbians. But it seems to me that the former is much easier to demonstrate in court than the latter.

UPDATE: In the original version of this post, I accidentally wrote that Democratic members of the House of Representatives voted for DOMA by a 188-65 margin when the law was passed in 1996. The correct figure was 118-65. I regret the mistake, which I have now corrected.