(CNN) -- A key part of the law banning federal recognition of same-sex marriage was struck down as unconstitutional by a U.S. appeals court Thursday.
The Defense of Marriage Act -- known as DOMA -- defines marriage for federal purposes as unions exclusively between a man and woman.
At issue is whether the federal government can deny tax, health and pension benefits to same-sex couples in states where they can legally marry. The ruling is a boost for gay rights advocates and the Obama administration, which in a rare move, has refused to defend a federal law in court.
"If we are right in thinking that disparate impact on minority interests and federalism concerns both require somewhat more in this case than almost automatic deference to Congress' will, this statute fails that test," said the three judge panel.
The 1st Circuit U.S. Court of Appeals, based in Boston, did not rule on the federal law's other key provision: that states that do not allow same-sex marriages cannot be forced to recognize such unions performed in other states. Traditionally, marriages in one jurisdiction are considered valid across the country.
DOMA was enacted in 1996, when Hawaii was considering legalizing same-sex marriage.
Marriage between two males or two females is legal in the District of Columbia and six states -- Massachusetts, Connecticut, Iowa, Vermont, New Hampshire and New York. It is set to become legal in Washington state next week and in Maryland in January, but in each state the implementation could be delayed by opponents placing the question on the November ballot.
Many other states have legalized domestic partnerships and civil unions for such couples, including New Jersey, Illinois, Delaware, Rhode Island and Hawaii, a step designed in most cases to provide the same rights of marriage under state law.
But other states have passed laws or state constitutional amendments banning such marriages.
The appeals court said it recognizes how divisive the issue is, and noted it may ultimately be up to the Supreme Court to decide. But this decision is the first at this judicial stage to find the heart of the law unconstitutional.
"Many Americans believe that marriage is the union of a man and a woman, and most Americans live in states where that is the law today," said Judge Michael Boudin, appointed to the bench in 1992 by President George H.W. Bush. "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. 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."
Chief Judge Sandra Lynch, a Clinton nominee, and Judge Juan Torruella, a Reagan nominee, joined in the opinion.
It is in effect only within states with gay marriage laws covered by the 1st Circuit -- Massachusetts and New Hampshire -- and has limited enforcement. That means there will be no immediate eligibility for financial benefits currently denied same-sex married couples. No change is likely until the high court decides the matter.
Massachusetts had challenged Section 3 of the law on behalf of a group of seven couples. Similar lawsuits have been filed across the country.
DOMA is being officially defended in court by House Republicans, led by Speaker John Boehner, R-Ohio, who stepped in after the Justice Department refused to participate. The Obama administration announced last year it believed the law to be unconstitutional.
A bill known as the Respect for Marriage Act is working its way through Congress and would repeal DOMA.
Congressional opponents of DOMA hailed the court's opinion.
"It's very good new for those who are fighting discrimination in any place, including in the area of marriage equality," said House Minority Leader Nancy Pelosi, D-California.
The case was argued in Boston last month. The lawyer for the couples said states have long-standing authority to control and define marriage, and that Congress has no right to intervene through DOMA, clearly designed, said the lawyer, as "disrespect" to lesbians and gays.
But Paul Clement, the private attorney hired by Boehner to defend the law, argued a congressionally mandated, uniform standard to define marriage for federal purposes is both proper and practical.
Groups fighting DOMA were ecstatic at the decision.
"All Massachusetts couples should be afforded the same rights and protections under the law, and we hope that this decision will be the final step toward ensuring that equality for all," said the state's attorney general, Martha Coakley, who in 2009 filed the initial lawsuit challenging DOMA.
"As more loving same-sex couples commit their lives to one another in marriage, the harms of this unjust law become more clear," said Evan Wolfson, president of Freedom to Marry, "from service members, risking their lives to protect ours, being denied the ability to protect their own families through military medical insurance or survivor benefits, to senior citizens having to move out of their homes after their partners of many decades pass on because they cannot access Social Security protections afforded any other legally married couple."
There was no immediate reaction from Boehner or the Bipartisan Legal Advisory Group in the House of Representatives. But gay marriage opponents expressed confidence the Supreme Court would eventually reverse the ruling.
"Society should protect and strengthen marriage, not undermine it," said Alliance Defense Fund Legal Counsel Dale Schowengerdt. "In allowing one state to hold the federal government, and potentially other states, hostage to redefine marriage, the 1st Circuit attempts a bridge too far. Under this rationale, if just one state decided to accept polygamy, the federal government and perhaps other states would be forced to accept it, too."
The issue has been working along two legal tracks. A federal appeals court earlier this month ruled against California's voter-approved ban on same-sex marriage, arguing the ban unconstitutionally singles out gays and lesbians for discrimination.
In a split decision, a three-judge panel of the 9th U.S. Circuit Court of Appeals found the state's Proposition 8 "works a meaningful harm to gays and lesbians" by denying their right to civil marriage in violation of the 14th Amendment.
Both the California and Massachusetts cases could soon be presented to the U.S. Supreme Court for review. The justices would have the discretion to accept one, both, or neither case -- perhaps deferring judicial review until a later time, after more lower courts have had time to debate the matter.
The case is Massachusetts v. U.S. Dept. of Health and Human Services (10-2204).