Anything substantive he might say on same-sex marriage  after the Iowa ruling, the White House put out a statement saying the president “respects the decision”  would be endlessly parsed. If Mr. Obama were to embrace same-sex marriage, he would be seen as reversing a campaign position and alienating some moderate and religious voters he has courted.

And if he appoints a gay person to the Supreme Court, he would be viewed by social conservatives  including many black ministers, another of his core constituency groups  as putting a vote for same-sex marriage on the highest court in the land. Two gay women, Kathleen M. Sullivan and Pamela S. Karlan, both of Stanford Law School, have been suggested as potential nominees.

“That would be tantamount to opening the gate for the other side,” said Bishop Harry J. Jackson Jr. of the Hope Christian Church in Beltsville, Md., who is organizing protests in Washington, where the City Council passed an ordinance this week recognizing same-sex marriages in other states. “If he meant what he said about marriage then I think he has got to stand up and be a president who acts on his beliefs.”

Some say change is inevitable, not only for Mr. Obama but also for other Democratic politicians who have embraced civil unions but rejected same-sex marriage. Now that the Iowa ruling has pushed the battle into the nation’s heartland, the issue will inevitably come up during the 2010 midterm elections and the 2012 presidential campaign.

“We’ve elected probably the most pro-gay president in history; he’s very good on the issues but he is not good on gay marriage,” said Steven Elmendorf, a gay Democratic lobbyist. “From the gay community’s perspective, he and a lot of other elected officials are wrong on this. My view is that over time, they’re going to realize they’re wrong and they’re going to change.”

Mr. Obama has chosen a number of openly gay people for prominent jobs, including Fred P. Hochberg as chairman of the Export-Import Bank and John Berry to run the Office of Personnel Management. And he is the first president to set aside tickets for gay families to attend the White House Easter Egg Roll.

But on legislation, allies of Mr. Obama’s are not surprised that he is charting a careful course. In addition to calling for the repeal of the “don’t ask, don’t tell” policy in the military, Mr. Obama supports a legislative repeal of the Defense of Marriage Act, the 1996 law that said states need not recognize same-sex marriages performed in other states. Opponents of same-sex marriage say that is an inconsistency.