In a unanimous decision, the three-judge panel of the 1st U.S. Circuit Court of Appeals in Boston said the 1996 law deprives gay couples of the rights and privileges granted to heterosexual couples.
The court didn't rule on the law's more politically combustible provision - that states without same-sex marriage cannot be forced to recognize gay unions performed in states where it's legal. It also wasn't asked to address whether gay couples have a constitutional right to marry.
The law was passed at a time when it appeared Hawaii would legalize gay marriage. Since then, many states have instituted their own bans on gay marriage, while eight states have approved the practice, led by Massachusetts in 2004.
The court, the first federal appeals panel to rule against the benefits section of the law, agreed with a lower court judge who in 2010 concluded that the law interferes with the right of a state to define marriage and denies married gay couples federal benefits given to heterosexual married couples, including the ability to file joint tax returns. The ruling came in two lawsuits, one filed by the Boston-based legal group Gay & Lesbian Advocates & Defenders (GLAD) and the other by state Attorney General Martha Coakley.
"For me, it's more just about having equality and not having a system of first- and second-class marriages," said plaintiff Jonathan Knight, a financial associate at Harvard Medical School who married Marlin Nabors in 2006.
"I think we can do better, as a country, than that," said Knight, a plaintiff in the GLAD lawsuit.
Knight said the Defense of Marriage Act costs the couple an extra $1,000 a year because they cannot file a joint federal tax return.
Opponents of gay marriage blasted the decision.
"This ruling that a state can mandate to the federal government the definition of marriage for the sake of receiving federal benefits, we find really bizarre, rather arrogant, if I may say so," said Kris Mineau, president of the Massachusetts Family Institute.
Since Congress passed the law, eight states have approved gay marriage, including Massachusetts, Connecticut, New York, Iowa, New Hampshire, Vermont, Maryland, Washington state and the District of Columbia. Maryland and Washington's laws are not yet in effect and may be subject to referendums.
Last year, President Barack Obama announced that the Department of Justice would no longer defend the constitutionality of the law. After that, House Speaker John Boehner convened the Bipartisan Legal Advisory Group to defend it. The legal group argued the case before the appeals court.
White House spokesman Jay Carney said the appeals court ruling is "in concert with the president's views." Obama, who once opposed gay marriage, declared his unequivocal personal support on May 9.
Carney wouldn't say whether the government would actively seek to have the law overturned if the case goes before the Supreme Court.
"I can't predict what the next steps will be in handling cases of this nature," Carney said.
The 1st Circuit said its ruling would not be enforced until the Supreme Court decides the case, meaning that same-sex married couples will not be eligible to receive the economic benefits denied by the law until the high court rules.
That's because the ruling only applies to states within the circuit - Massachusetts, Rhode Island, Maine and New Hampshire - and Puerto Rico. Only the Supreme Court has the final say in deciding whether a law passed by Congress is unconstitutional.
Until Congress passed the law, "the power to define marriage had always been left to individual states, the appeals court said in its ruling.
"One virtue of federalism is that it permits this diversity of governance based on local choice, but this applies as well to the states that have chosen to legalize same-sex marriage," Judge Michael Boudin wrote for the court. "Under current Supreme Court authority, Congress' denial of federal benefits to same-sex couples lawfully married in Massachusetts has not been adequately supported by any permissible federal interest."
Several times in its ruling, the appeals court noted that the case will probably end up before the high court, at one point saying, "only the Supreme Court can finally decide this unique case."
Carl Tobias, a constitutional law professor at the University of Richmond, said the court kept its ruling narrow, declaring unconstitutional only the section of the law on federal benefits. Although supporters and opponents of gay marriage may depict the ruling as the beginning of the end of the law, he said, the Supreme Court is likely to limit its ruling to the benefits issue as well.
"I think lawyers could argue that the arguments are equally applicable to the other sections of the law, but you have to stretch. You have to take those out of the context in which it's being applied, and I don't think the court will do that," Tobias said.
During arguments before the court last month, a lawyer for gay married couples said the law amounted to "across-the-board disrespect." The couples argued that the power to define and regulate marriage had been left to the states for more than 200 years before Congress passed the law.
Paul Clement, a Washington, D.C., attorney who defended the law on behalf of the Bipartisan Legal Advisory Group, argued that Congress had a rational basis for passing the Defense of Marriage Act in 1996, when opponents worried that states would be forced to recognize gay marriages performed elsewhere.
The group said Congress wanted to preserve a traditional and uniform definition of marriage and has the power to define terms used to federal statutes to distribute federal benefits.
"But we have always been clear we expect this matter ultimately to be decided by the Supreme Court, and that has not changed," he said in a statement.
Two of the three judges who decided the case Thursday were Republican appointees, while the other was a Democratic appointee. Boudin was appointed by President George H.W. Bush. Judge Juan Torruella was appointed by President Ronald Reagan. Chief Judge Sandra Lynch is an appointee of President Bill Clinton.
In California, two federal judges have found this year that the law violates the due-process rights of legally married same-sex couples.
In the most recent case, a judge found the law unconstitutional because it denies long-term health insurance benefits to legal spouses of state employees and retirees. The judge also said a section of the federal tax code that makes the domestic partners of state workers ineligible for long-term care insurance violates the civil rights of people in gay and lesbian relationships.