The U.S. Supreme Court on Wednesday struck down a controversial federal law that defines marriage as a union between a man and a woman, in a major victory for supporters of same-sex marriage.

PHOTOS: Gays and the Law: A Bumpy History

The Defense of Marriage Act (DOMA) had denied married gay and lesbian couples in the United States the same rights and benefits that straight couples have long taken for granted.

"DOMA is unconstitutional as a deprivation of the equal liberty of persons that is protected by the Fifth Amendment" of the Constitution, the court said in a 5-4 decision.

The ruling will allow married same-sex couples the same federal benefits provided to opposite-sex married couples.

In the case, a gay widow from New York, Edith Windsor, backed by the Obama administration, challenged the federal law, passed in 1996.

The law denied married gay and lesbian couples benefits including tax breaks and welfare benefits, as well as access to a hospitalized spouse.

Fifty-three percent of Americans support gay marriage, according to a recent survey by the Gallup polling institute.