In saying marriage is an issue for states to decide, appeals court is second in a week to call Doma unconstitutional

A federal appeals court has struck down the Defense of Marriage Act – Congress's key legislation to block gay marriage – as unconstitutional in a ruling that will propel the issue to the supreme court.

The Boston-based first district appeals court upheld a lower court decision that gay marriage is a matter for individual states to decide and that the federal government does not have the authority to deny recognition of same-sex unions.

It is the highest court to date to strike down the 1996 act, known as Doma, which denies gay married couples federal benefits and protections given to heterosexuals such as health coverage, social security payments and medical leave. A host of states have passed their own bans on gay marriage, but eight states and the District of Columbia have authorised same-sex unions.

The ruling, in a case brought by same-sex couples who married in Massachusetts, is likely to sharpen the political debate over the issue during the presidential election campaign following Barack Obama's historic statement of support for gay marriage.

The Human Rights Campaign, a civil rights organisation pressing for equality, called the ruling historic.

"For the first time, a federal appeals court has recognised that our constitution will not tolerate a law that forces the federal government to deny lawfully -married same-sex couples equal treatment. The writing is clearly on the wall for the demise of this unjust and indefensible law that hurts real families," said the HRC president, Joe Solmonese.

The ruling was authored by a judge widely regarded as conservative, Michael Boudin, who was appointed by President George Bush Sr. However, the three-judge panel's position may be seen as conservative because it emphasises states rights over federal power by saying that if states are free to ban gay marriage they should also be free to legalise it without interference from Washington.

"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. 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 legalise same-sex marriage," Boudin said in the ruling.

"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."

Boudin said that the court did not believe that Doma was motivated principally by hostility to homosexuality.

"The many legislators who supported Doma acted from a variety of motives, one central and expressed aim being to preserve the heritage of marriage as traditionally defined over centuries of western civilisation," he wrote.

But Boudin added that attitudes toward discrimination against minorities have evolved to the point where they are no longer acceptable. He said that for 150 years the "desire to maintain tradition would alone have been justification enough for almost any statute".

"But supreme court decisions in the last 50 years call for closer scrutiny of government action touching upon minority group interests and of federal action in areas of traditional state concern," Boudin wrote.

The appeals court said it recognises that it would not have the final word and that "only the supreme court can finally decide this unique case".

The case was brought by three surviving spouses of same sex marriages in Massachusetts and seven other same-sex couples after they were denied federal benefits.

The Massachusetts attorney general, Martha Coakley, praised the ruling. "Today's landmark ruling makes clear once again that Doma is a discriminatory law for which there is no justification. It is unconstitutional for the federal government to create a system of first and second class marriages, and it does harm to families in Massachusetts every day," she said.

"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."

The Boston ruling follows a similar decision by a district judge in California last week that Doma is unconstitutional, a further chipping away at the law that is almost certain to see it land before the supreme court within the next year or so.

The legal battle has been complicated by the White House's decision to no longer defend Doma in court. That has forced the Republican speaker of the House of Representatives, John Boehner, to set up the Bipartisan Legal Advisory Group to defend the legislation.

In the California decision last week, Judge Claudia Wilken referred to a 1996 supreme court ruling on discriminatory measures in Colorado that found gays and lesbians are protected from "burdensome legislation that is the product of sheer anti-gay animus and devoid of any legitimate governmental purpose".

Wilken also cited the nature of deliberations in Congress which she said showed "evidence of moral condemnation and social disapprobation of same-sex couples".

"The legislative history described above demonstrates that animus toward, and moral rejection of, homosexuality and same-sex relationships are apparent in the congressional record," she wrote.

A Washington Post-ABC News opinion poll published last week found that more Americans than ever support the right of gay couples to marry with 53% in favour and 39% opposed.