Edie Windsor, 83, of New York, leaves the Supreme Court in March after the oral argument in her case challenging the Defense of Marriage Act. / JEWEL SAMAD AFP/Getty Images

by Richard Wolf and Brad Heath, USA TODAY

by Richard Wolf and Brad Heath, USA TODAY

WASHINGTON -- A divided Supreme Court gave a major boost to gay and lesbian rights on Wednesday, striking down a key section of a federal law that denied federal benefits to legally married same-sex couples and forcefully criticizing what it called unconstitutional discrimination.

In a decision deeply skeptical of laws that treat gays and lesbians differently from others, the justices invalidated a section of the 17-year-old Defense of Marriage Act that denied federal benefits to married gays and lesbians in a dozen states, from Maine to Washington, and the District of Columbia. That measure, the court declared, existed primarily "to demean those persons who are in a lawful same-sex marriage."

The 5-4 decision gives the court's blessing - at least in part - to a gay-marriage movement that has gained momentum over the past decade, and is one of the most significant legal victories ever for same-sex rights advocates. It also signaled that the high court may look more critically in the future at other laws that single out same-sex couples.

The decision, written by Justice Anthony Kennedy, concluded that law's benefit limitations unconstitutionally discriminated against gay and lesbian couples. "No legitimate purpose overcomes the purpose and effect to disparage and to injure those whom the State, by its marriage laws, sought to protect in personhood and dignity. By seeking to displace this protection and treating those persons as living in marriages less respected than others, the federal statute is in violation of the Fifth Amendment," Kennedy wrote.

Still, Kennedy was careful to say that the decision applied only to "lawful marriages" performed in states that already recognize same-sex unions. It has no immediate effect on the 36 other states whose laws forbid same-sex marriages.

But supporters of same-sex marriage said immediately that they had scored a decisive victory. President Obama said on Twitter that the decision is "a historic step forward" for marriage equality. Later, he said in a statement that "we are a people who declared that we are all created equal ‚?? and the love we commit to one another must be equal as well."

Kennedy was joined by the court's four more liberal justices. The court's four conservative justices dissented.

Justice Antonin Scalia accused his colleagues of a "jaw-dropping" overreach. And he hinted in a long dissenting opinion that the court's decision invalidating DOMA could have broader implications: "By formally declaring anyone opposed to same-sex marriage an enemy of human decency, the majority arms well every challenger to a state law restricting marriage to its traditional definition," he wrote.

Kennedy's decision for the court did not necessarily disagree. DOMA was invalid, in part, he said, because it "instructs all federal officials, and indeed all persons with whom same-sex couples interact, including their own children, that their marriage is less worthy than the marriages of others."

The decision was greeted with celebration among gay rights advocates and dread by religious and social conservatives. It also created an instant celebrity in 83-year-old Edie Windsor, the lesbian widow who challenged the law based on a six-figure estate tax bill that a heterosexual spouse would not have received.

The Defense of Marriage Act has two main sections, only one of which - defining marriage in federal laws as between a man and a woman - was contested. Because of it, benefits and programs enjoyed by opposite-sex couples aren't available to gays and lesbians under federal employment, health, tax and other laws. The other provision shields states from having to recognize same-sex marriages from other states.

Attorney General Eric Holder announced in 2011 that the Obama administration considered DOMA unconstitutional and no longer would defend it in court. Into the breach stepped House Republicans, who argued - to no avail in lower courts - that the law saves needed federal resources and ensures they are distributed equally among the states.

At last count, there were more than 1,100 provisions in federal laws that listed marital status as a factor in determining benefits, rights and privileges. The list, prepared by the Government Accountability Office, was most recently updated in 2003.

The most prevalent are tax laws. Despite their marriage certificates, gay and lesbian spouses cannot get tax-free health benefits from their employers. That alone costs them about $1,000 a year on average, says Gary Gates, a demographer who studies gay and lesbian trends at the UCLA School of Law's Williams Institute.

Gays and lesbians can't file joint federal tax returns, as heterosexual married couples can, which often saves families thousands of dollars. And when a spouse dies, the widow or widower is liable for inheritance taxes; heterosexual couples enjoy a marital deduction.

That estate tax problem is what prompted Windsor to file her lawsuit. She stands to win back the $363,000 she paid in 2009 on the estate of her deceased spouse, Thea Spyer - a tax she would not have owed if their marriage was recognized by the federal government.

A few dozen other same-sex married couples, widows and widowers also stand to gain because they had filed legal challenges or tax claims that have not expired, says Mary Bonauto, civil rights project director at Gay & Lesbian Advocates & Defenders. For all other same-sex married couples, the impact of the court's ruling would be prospective, not retroactive.