An appeals court in New York has ruled that a US law defining marriage as between a man and a woman is unconstitutional, saying the gay population has "suffered a history of discrimination".
The national fight over gay marriage is expected to reach the country's top court soon. The Second US Circuit Court of Appeals found no reason the Defence of Marriage Act could be used to deny benefits to married same-sex couples.
The law denies federal recognition of same-sex marriages and affirms the right of states to refuse to recognise such marriages.
The 2-1 decision came after a woman sued the government, saying the law required her to pay more than 363,000 US dollars (£225,900) in federal estate tax after her partner of 44 years died.
In writing the majority opinion, Judge Dennis Jacobs said discrimination against gay people should be scrutinised by the courts just as discrimination against women was scrutinised in the 1970s.
"The question is not whether homosexuals have achieved political successes over the years; they clearly have. The question is whether they have the strength to politically protect themselves from wrongful discrimination," said Mr Jacobs.
Judge Chester J Straub dissented, saying that if the government was to change its understanding of marriage he believes "it is for the American people to do so".
The Defence of Marriage Act was passed by bipartisan majorities in both houses of Congress and signed by President Bill Clinton after it appeared in 1993 that Hawaii might legalise gay marriage.
Since then, many states have banned gay marriage but several have approved it, including Massachusetts and New York. The government defended the federal law until President Barack Obama and Attorney General Eric Holder directed attorneys in early 2011 to stop doing so.
James Esseks, an attorney for the American Civil Liberties Union, called the ruling "a watershed moment in the legal movement for lesbian and gay rights". "It's fabulous news for same-sex couples in New York and other states," he said.