"Tradition, no matter how long established, cannot by itself justify a discriminatory law," the administration said in a brief filed with the high court late Thursday. "Prejudice may not be the basis for differential treatment under the law."
"The designation of marriage," the brief notes, "conveys a message to society that domestic partnerships or civil unions cannot match."
Presenting the argument in that manner struck a legal middle ground — giving the justices a way to overturn California's Proposition 8 without upsetting the laws in all states that ban same-sex marriage. Gay rights advocates have asked the court to strike down all laws nationwide that bar same-sex couples from marrying, but many legal analysts have doubted that a majority of the justices would go that far.
The seven other states directly affected would be Delaware, Hawaii, Illinois, Nevada, New Jersey, Oregon and Rhode Island, the brief says.
In addition, the government argued, laws that discriminate based on sexual orientation should be treated skeptically by the courts, much as laws that discriminate by gender. That standard, if adopted, ultimately could invalidate other states' laws against same-sex marriage.
The administration was not required to get involved in the California case, but the White House was heavily lobbied by gay rights groups that have orchestrated a series of briefs on their side by business leaders, prominent Republicans and other groups. Although the government's brief did not go as far as gay rights advocates would have liked, it won immediate praise from those organizations.
Unlike most other outside groups, the views of the solicitor general's office often have particular weight with the justices, although the court could decide the case on several other grounds.
The decision to file a brief, which came after several weeks of hesitation and internal debate, marks the latest step in President Obama's self-described evolution on the issue of same-sex marriage. When he ran for president in 2008, he did not support marriage rights for gays and lesbians, although he also opposed Proposition 8, which California voters approved that year.
Last spring, as he was running for reelection, Obama said he supported gay marriage but believed the issue was a matter for the states to decide. At the time, some close to him suggested he would not weigh in officially on a constitutional right to marry.
But in January, gay rights activists took heart when, in his inaugural address, Obama compared their struggle to the civil rights and women's movements.
"We, the people, declare today that the most evident of truths — that all of us are created equal — is the star that guides us still; just as it guided our forebears through Seneca Falls, and Selma, and Stonewall," Obama said in that address, putting on the same plane key moments in fighting discrimination based on gender, race and sexual orientation.
Since then, Obama had appeared at times to be debating with himself. He referred to same-sex marriage as an issue of civil rights, but also told people in his inner circle that he thought social change was better when it took place through elections, not by court decree.
In conversations, he talked about the writings of civil rights leaders who had struggled with how and when to let courts drive societal change. On Wednesday, Obama seemed to be resolving that inner battle as he paid tribute to civil rights pioneer Rosa Parks at a ceremony in her honor.
"Whether out of inertia or selfishness, whether out of fear or a simple lack of moral imagination, we so often spend our lives as if in a fog, accepting injustice, rationalizing inequity, tolerating the intolerable," he said.
"Rosa Parks tell us there's always something we can do," he went on. "She tells us that we all have responsibilities, to ourselves and to one another."
In a statement Thursday, Atty. Gen. Eric H. Holder Jr. also put the marriage case in the context of the country's civil rights tradition. "Throughout history, we have seen the unjust consequences of decisions and policies rooted in discrimination," he said. "The issues before the Supreme Court are not just important to the tens of thousands of Americans who are being denied equal benefits and rights under our laws, but to our nation as a whole."
Publicly, White House officials took pains to present the decision of whether to weigh in on the marriage case as one made at the Justice Department.