Correction: An earlier version of this story misattributed some comments made by Chief Justice John Roberts to Justice Antonin Scalia. The story has been corrected.

The Post’s Bob Barnes explains what went on inside the Supreme Court on Wednesday as the justices appeared skeptical during the oral arguments for the Defense of Marriage Act. (JulieAnn McKellogg and Jayne Orenstein/The Washington Post)

A majority of the Supreme Court on Wednesday appeared ready to strike down a key section of a law that withholds federal benefits from gay married couples, as the justices concluded two days of hearings that showed them to be as divided as the rest of the nation over same-sex marriage.

Justice Anthony M. Kennedy, the pivotal justice on the issue, said the federal Defense of Marriage Act (DOMA) may have intruded too deeply on the traditional role of state governments in defining marriage. The federal law recognizes marriages only between a man and a woman, and Kennedy said that ignores states “which have come to the conclusion that gay marriage is lawful.”

“Citizens’ day-to-day life” is affected by the more than 1,100 references to marriage contained in federal laws and regulations, Kennedy said, creating a “real risk of running in conflict with what has always been thought to be the essence of the state police power, which is to regulate marriage, divorce, custody.”

It appeared Kennedy’s interest in states’ rights might align with the concerns of the court’s four liberals that the law impermissibly targeted gay couples. Justice Ruth Bader Ginsburg said that the law, by withholding things such as tax advantages, Social Security benefits and leave to care for a spouse, raises a question: “What kind of marriage is it?”

A decision on DOMA — passed in 1996 when same-sex marriages were only theoretical — might be the most tangible development to come from the court’s two days of hearings on same-sex marriage.

On Tuesday, when considering an appeals court’s decision that overturned California’s voter-approved ban on same-sex marriage, the justices seemed to be looking for the narrowest way possible to resolve the case. They seemed reluctant to find that gay people have a constitutional right to marry.

In Wednesday’s nearly two hours of argument, the court also spent little time on another important legal issue the cases raised: whether laws affecting homosexuals deserved the kind of heightened scrutiny that courts use when examining possible discrimination against racial minorities.

But the arguments did reveal an unsurprising divide on the court, with liberal justices more supportive of gay rights and same-sex marriage and conservatives more tolerant of government action to protect “traditional marriage.”

At Wednesday’s arguments, Chief Justice John G. Roberts Jr. was skeptical of the idea that gay people might lack political power when it comes to government actions.

“You don’t doubt that the lobby supporting the enactment of same sex-marriage laws in different states is politically powerful, do you?” Roberts asked Roberta A. Kaplan, one of the lawyers bringing the challenge to DOMA. “As far as I can tell, political figures are falling over themselves to endorse your side of the case.”

“The fact of the matter is, Mr. Chief Justice,” Kaplan responded, “that no other group in recent history has been subjected to popular referenda to take away rights that have already been given or exclude those rights the way gay people have.”

Roberts was equally tough on the Obama administration. President Obama and Attorney General Eric H. Holder Jr. decided two years ago that DOMA was unconstitutional and have declined to defend the law in court. But the administration has continued to enforce it until the Supreme Court decides its fate.

If Obama has decided the law is unconstitutional, Roberts said, “I don’t see why he doesn’t have the courage of his convictions” to stop enforcing the law, “rather than saying, ‘Oh, we’ll wait till the Supreme Court tells us we have no choice.’ ”

The liberal justices sharply questioned former George W. Bush administration solicitor general Paul D. Clement, who is representing House Republican leaders who are defending DOMA.

He said the law, passed by overwhelming majorities in each chamber of Congress and signed by President Bill Clinton, was a reaction to the prospect that Hawaiian courts were on the verge of approving same-sex marriage.

Congress feared that “by the operation of one state’s state judiciary, same-sex marriage is basically going to be recognized throughout the country,” Clement said. “And what Congress says is: ‘Wait a minute. Let’s take a timeout here. This is a redefinition of an age-old institution.’ ”

Clement said Congress was within its powers to define marriage for the benefits it bestows and to strive for “uniformity” across the country by limiting those benefits to heterosexual couples.

He was strongly challenged by Justice Elena Kagan. She said that when Congress “targets a group that is not everybody’s favorite group in the world,” the court has an obligation to examine, “with some rigor, to say, ‘Do we really think that Congress was doing this for uniformity reasons or do we think that Congress’s judgment was infected by dislike, by fear, by animus and so forth?’ ”

She caused a stir in the courtroom, which appeared to be mostly filled with supporters of same-sex marriage, when she quoted language from a House committee’s analysis of the law: “Congress decided to reflect an honor of collective moral judgment and to express moral disapproval of homosexuality.”

Clement replied: “Does the House report say that? Of course, the House report says that.” But he added that the court has never struck a statute “just because a couple of legislators may have had an improper motive.”

Solicitor General Donald B. Verrilli Jr., representing the Obama administration, also sought to convince the court that the section of DOMA being challenged was motivated by prejudice.

When Roberts skeptically asked whether “the 84 senators who voted in favor of it and the president who signed it” were driven by animus, Verrilli said that was not the point.

The section, he said, “is discrimination.”

The case was brought by 83-year-old Edith Windsor, who watched from the second row. Windsor married Thea Spyer, her partner of more than 40 years, in Canada in 2007. Both were residents of New York. When Spyer died in 2009, she left her estate to Windsor.

At that time, the state of New York recognized the marriage. But because the marriage was not recognized by the U.S. government, Windsor paid a federal estate tax bill of more than $360,000 that would not have been assessed if she were married to a man.

The Obama administration agreed with the appeals court that ordered a refund but wanted the Supreme Court to render a definitive verdict on DOMA.

That led to the legal wrangling that dominated the first part of the argument and could lead to a decision that the case is not properly before the court.

A court-appointed lawyer, Harvard law professor Vicki C. Jackson, told the justices that Republican leaders in the House do not have proper standing to defend the law and that the Obama administration was not a viable party, because it agrees with the lower courts.

Roberts and Justice Antonin Scalia were the most critical of the approach the Obama administration has taken on the law. Roberts said the administration’s agreement with the lower court meant it was making an extraordinary request to have the Supreme Court consider it.

“You’re asking us to do something we’ve never done before,” Roberts said.

When Deputy Solicitor General Sri Srinivasan acknowledged that it was unusual, Roberts shot back: “No, not unusual — totally unprecedented.”

Discuss this topic and other political issues in the politics discussion forums.