It's a groundbreaking ruling that is certain to wind up before the U.S. Supreme Court.
A three-judge panel of the 1st U.S. Circuit Court of Appeals in Boston said the law defines marriage as a union between a man and a woman, which deprives gay couples of the rights and privileges granted to heterosexual couples.
The 1st Circuit said its ruling wouldn't be enforced until the U.S. Supreme Court decides the case. The ruling only applies to states within the circuit, including Massachusetts, Rhode Island, Maine, New Hampshire and Puerto Rico. Only the Supreme Court has the final say in deciding whether a law passed by Congress is unconstitutional.
The Defense of Marriage Act was passed in 1996, when it appeared Hawaii would legalize gay marriage. Since then, many states, including California, have instituted their own bans on gay marriage.
The court did not rule on the law's more politically combustible provision, which said 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.
Last year, President Barack Obama announced the U.S. 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 last month, saying 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 a lawyer for gay married couples said the law amounts to "across-the-board disrespect, " adding that the power to define and regulate marriage had been left to the states for more than 200 years before Congress passed the Defense of Marriage Act.
Two of the three judges who decided the case were Republican appointees, while the other was a Democratic appointee. Judge Michael Boudin was appointed by President George H.W. Bush, while Judge Juan Torruella was appointed by President Ronald Reagan. Chief Judge Sandra Lynch is an appointee of President Bill Clinton.
The Associated Press contributed to this report.