In separate, strongly worded orders, two judges of the federal appeals court in California said that employees of their court were entitled to health benefits for their same-sex partners under the program that insures millions of federal workers.
But the federal Office of Personnel Management has instructed insurers not to provide the benefits ordered by the judges, citing a 1996 law, the Defense of Marriage Act.
As a presidential candidate, Mr. Obama said he would “fight hard” for the rights of gay couples. As a senator, he sponsored legislation that would have provided health benefits to same-sex partners of federal employees.
Now, Mr. Obama is in a tough spot. If he supports the personnel office on denying benefits to the San Francisco court employees, he risks agitating liberal groups that helped him win election. If he supports the judges and challenges the marriage act, he risks alienating Republicans with whom he is seeking to work on economic, health care and numerous other matters.
Already, some gay rights groups remain upset over Mr. Obama’s choice of the Rev. Rick Warren, an opponent of same-sex marriage, to give the invocation at his inauguration. Liberal groups also believe that Mr. Obama has not moved fast enough to reverse the policies of his predecessor on issues like detention and interrogation of terrorism suspects.
In a letter on Feb. 20 to the Administrative Office of the United States Courts, an arm of the federal judiciary, Lorraine E. Dettman, assistant director of the personnel office, said, “Plans in the Federal Employees Health Benefits Program may not provide coverage for domestic partners, or legally married partners of the same sex, even though recognized by state law.”
Benefits are available to the spouse of a federal employee, Ms. Dettman said, but the 1996 law stipulates that “the word ‘spouse’ refers only to a person of the opposite sex who is a husband or a wife.”
Federal officials said they had to follow the laws on the books. But Richard Socarides, a New York lawyer who was an adviser to President Bill Clinton on gay issues, said he believed that Mr. Obama “has broad discretionary authority to find ways to ameliorate some of the more blatant examples of discrimination.”
The orders were issued by the chief judge of the appeals court, Alex Kozinski, and another member of the court, Judge Stephen Reinhardt.
Judge Kozinski, often described as a libertarian or an independent conservative, and Judge Reinhardt, a liberal, ruled not as part of a lawsuit, but in their role as employers resolving employee grievances.
Similar issues were raised in a lawsuit filed against the federal government last week in Boston by eight same-sex couples. The administration is weighing how to respond.
Gay federal employees said they were denied equal compensation when their partners were denied health benefits.
Administration officials declined to say what they planned to do in the California cases if the judges tried to enforce their orders.
Ben LaBolt, a White House spokesman, said: “While the president opposes gay marriage, he supports legislative repeal of the Defense of Marriage Act. He believes this country must realize its founding promise of equality by treating all its citizens with dignity and respect.”
Mr. Obama and his choice for director of the personnel office, M. John Berry, have endorsed the idea of providing health benefits to same-sex partners of federal employees.
The Office of Personnel Management estimates the cost at $670 million over 10 years.
Mr. Berry, who is gay, has been director of the National Zoological Park since 2005. As an Interior Department official in the Clinton administration, he developed procedures to deal with complaints of discrimination based on sexual orientation. They became a model for other agencies.
The pending cases involve Karen Golinski, 46, a lawyer who works for the United States Court of Appeals for the Ninth Circuit, and Brad D. Levenson, 49, a lawyer who works for the federal public defender in Los Angeles.
Ms. Golinski’s insurance plan, offered by Blue Cross and Blue Shield, rejected her effort to obtain health benefits for her spouse, Amy Cunninghis. Mr. Levenson’s insurer, a Kaiser Foundation health plan, turned down his application for his spouse, Tony Sears, based on instructions from the Office of Personnel Management.
In Ms. Golinski’s case, Judge Kozinski said that federal law authorized the Office of Personnel Management to arrange health benefits for federal employees and their family members. The law, he said, defines the “minimum requirements” for health insurance, but the government can provide more.
Judge Reinhardt confronted the question differently, and concluded that the Defense of Marriage Act, as applied to Mr. Levenson’s request, was unconstitutional because it violated the Fifth Amendment guarantee of “due process of law.”
“A bare desire to harm a politically unpopular group cannot provide a rational basis for governmental discrimination,” Judge Reinhardt wrote.
In adopting the Defense of Marriage Act, Congress said the government had a legitimate interest in “defending and nurturing the institution of traditional heterosexual marriage.”
But Judge Reinhardt said the denial of benefits to same-sex spouses would not encourage gay men and lesbians to marry members of the opposite sex or discourage same-sex marriages.
“So the denial cannot be said to nurture or defend the institution of heterosexual marriage,” the judge wrote.
Gary L. Bauer, president of American Values, a conservative advocacy group, said that if Mr. Obama extended benefits to same-sex partners of federal workers, he would “provoke a furious grass-roots reaction, reinvigorate the conservative coalition and undermine his efforts to portray himself as a moderate on social issues.”
Ms. Golinski has asked for a new hearing, where she will urge Judge Kozinski to enforce his order granting benefits to her partner. Mr. Levenson said he would soon ask Judge Reinhardt for a similar hearing.
In addition, Congress may soon weigh in.
Senator Joseph I. Lieberman, independent of Connecticut, and Representative Tammy Baldwin, Democrat of Wisconsin, plan to introduce bills that would provide benefits to same-sex partners of federal employees.
Similar bills died in the past. But “the new administration will have a new view,” Ms. Baldwin said.