Proponents of a right to gay marriage won a major victory this month in Massachusetts. At issue was a provision of the Defense of Marriage Act that defines marriage as the union of a man and woman for purposes of federal law. That provision effectively barred the U.S. government from granting Social Security and certain other benefits to same-sex couples.

In Gill v. Office of Personnel Management, the judge held that the act’s divergent treatment of same-sex and heterosexual couples violates the equal protection principles implicit in the Fifth Amendment. The court asked whether Congress had a legitimate basis for treating same-sex couples differently. The unambiguous answer was “No.”

How about procreation? No. Infertile persons are permitted to marry even though they cannot procreate. Child rearing? No. Studies show that children do just as well when raised by same-sex parents. Promoting traditional marriage? No. Heterosexual marriages will not be affected by allowing gay marriages. Conserving government resources? No. The Congressional Budget Office found that recognizing same-sex marriages would save money. We would have fewer children in state institutions, lower divorce rates and promiscuity, and increased wealth.

Congress’ real aim, wrote Judge Joseph Tauro, was to “disadvantage a group of which it disapproves. And such a classification, the Constitution clearly will not permit.” The judge bypassed the usual strict standard of judicial review that applies if a “fundamental” right is at issue. Instead, he applied the lowest standard, known as rational basis review, and concluded that “There’s no need to get to higher scrutiny if it fails rational basis review.”

Meanwhile, a federal court heard oral arguments last month in Perry v. Schwarzenegger, the high-profile same-sex marriage case in California. Judge Vaughn Walker will decide any day now whether California voters violated the U.S. Constitution by passing Proposition 8, a referendum defining marriage as between a man and a woman. That question is broader in two respects than the issue addressed in Gill.

First, California already provides substantially equal benefits to same-sex partners, but doesn’t dignify their union with a “marriage” label. Second, Gill, unlike Perry, was limited to the question whether federal law survives scrutiny when applied in a state that already permits gay marriages.

Despite those differences, Gill will certainly influence the larger issue in Perry: Does the Constitution protect a right of same-sex marriage that can be asserted to overturn contrary state law? If not, the two courts would have invalidated a definition of marriage under federal law that somehow passes muster under state law.

We don’t yet know whether the Obama administration will appeal Gill. Nor has the Justice Department weighed in on the broader implications of California’s Proposition 8. So far, the administration has tried to have it both ways. At a White House reception for Gay Pride Month, the president stated that “committed gay and lesbian couples deserve the same rights and responsibilities afforded to any married couple in this country. I have called for Congress to repeal the so-called Defense of Marriage Act.” But lawyers for the Justice Department insisted in their Massachusetts brief that they were bound to defend the act’s constitutionality, even though the agency “does not believe that DOMA is rationally related to any legitimate government interests in procreation and child-rearing.”

No matter which side prevails in California, the loser will surely take the case to the Court of Appeals for the 9th Circuit, and ultimately to the U.S. Supreme Court. It’s no time for equivocation by the administration. The president should be on the side of marriage equality, justice and the Constitution.