Updated

A majority of Supreme Court justices voiced skepticism Wednesday about the legitimacy of a federal provision that prevents married gay couples from receiving a range of federal benefits, raising questions about whether the Defense of Marriage Act will stand.

The court concluded arguments early Wednesday afternoon on the challenge to the Defense of Marriage Act provision that defines marriage as between a man and a woman. The hearing was the second in back-to-back gay marriage cases before the court this week, both of which have attracted intense public interest.

In the two-hour hearing Wednesday, Justice Anthony Kennedy, often the decisive vote in close cases, joined the four more liberal justices in raising questions about the provision of the federal Defense of Marriage Act that is being challenged.

Kennedy said the law appears to intrude on the power of states that have chosen to recognize same-sex marriages. Other justices said the law creates what Justice Ruth Bader Ginsburg called two classes of marriage, full marriage and "skim-milk marriage."

Click to listen to the oral arguments.

More On This...

The motivation behind the 1996 federal law, passed by large majorities in Congress and signed by President Bill Clinton, was questioned repeatedly by Justice Elena Kagan. She read from a House of Representatives report explaining that the reason for the law was "to express moral disapproval of homosexuality." The quote produced an audible reaction in the courtroom.

Paul Clement, representing the House Republican leadership in defending the law, said the more relevant question is whether Congress had "any rational basis for the statute." He supplied one, the federal government's interest in treating same-sex couples the same no matter where they live.

Clement said the government does not want military families "to resist transfer from West Point to Fort Sill because they're going to lose their benefits." The U.S. Military Academy at West Point is in New York, where same-sex marriage is legal, and Fort Sill is in Oklahoma, where gay marriages are not legal.

The law affects a range of benefits available to married couples, including tax breaks, survivor benefits and health insurance for spouses of federal employees.

It also is possible the court could dismiss the case for procedural reasons, though that prospect seemed less likely than it did in Tuesday's argument over gay marriage in California.

Marital status is relevant in more than 1,100 federal laws that include estate taxes, Social Security survivor benefits and health benefits for federal employees. Lawsuits around the country have led four federal district courts and two appeals courts to strike down the law's Section 3, which defines marriage.

In 2011, the Obama administration abandoned its defense of the law but continues to enforce it. House Republicans are now defending DOMA in the courts.

The justices chose for their review the case of Edith Windsor, 83, of New York, who sued to challenge a $363,000 federal estate tax bill after her partner of 44 years died in 2009.

Windsor, who goes by Edie, married Thea Spyer in 2007 in Canada after doctors told them that Spyer would not live much longer. She suffered from multiple sclerosis for many years. Spyer left everything she had to Windsor.

There is no dispute that if Windsor had been married to a man, her estate tax bill would have been zero.

The U.S. 2nd Circuit Court of Appeals in New York agreed with a district judge that the provision of DOMA deprived Windsor of the constitutional guarantee of equal protection of the law.

Like the Proposition 8 case from California, Windsor's lawsuit could falter on a legal technicality without a definitive ruling from the high court.

The House Republicans, the Obama administration and a lawyer appointed by the court were to spend part of the hearing discussing whether the House Republican leadership can defend the law in court because the administration decided not to, and whether the administration forfeited its right to participate in the case because it changed its position and now argues that the provision is unconstitutional.

If the Supreme Court finds that it does not have the authority to hear the case, Windsor probably would still get her refund because she won in the lower courts. But there would be no definitive decision about the law from the nation's highest court, and it would remain on the books.

On Tuesday, the justices weighed a fundamental issue: Does the Constitution require that people be allowed to marry whom they choose, regardless of either partner's gender? That case involved California's Proposition 8 ban on gay marriage.

If the justices choose to rule broadly, they could overturn Prop 8 and in doing so invalidate every other restriction on gay marriage in the country.

But the justices suggested Tuesday they could decide the case without issuing a ruling that ripples through all 50 states.

Several justices, including some liberals who seemed open to gay marriage, raised doubts that the case was properly before them. Such an outcome would almost certainly allow gay marriages to resume in California but would have no impact elsewhere.

The justices' statement spanned the gamut. Chief Justice John Roberts said it seemed supporters of gay marriage were trying to change the meaning of the word "marriage" by including same-sex couples.

Lawyers representing supporters of the California ban known as Proposition 8 argued that the court should not override the democratic process and impose a judicial solution that would redefine marriage in the some 40 states that do not allow same-sex couples to wed.

Decisions in both cases are expected by June.

Americans as a whole are divided on the issue. A Fox News poll released Thursday showed 49 percent of voters favor legalizing gay marriage, while 46 percent oppose it.

That marks a shift since the question was first asked in 2003 -- when 32 percent said gay marriage should be legal, and 58 percent opposed it.

Gay marriage has been approved in nine states -- Connecticut, Iowa, Maine, Maryland, Massachusetts, New Hampshire, New York, Vermont, Washington -- and the District of Columbia. But 31 states have amended their constitutions to prohibit same-sex marriage. North Carolina was the most recent example last May.

The Associated Press contributed to this report.