President Obama’s endorsement of gay marriage on Wednesday was by any measure a watershed. A sitting United States president took sides in what many people consider the last civil rights movement, providing the most powerful evidence to date of how rapidly views are moving on an issue that was politically toxic just five years ago.
Mr. Obama faces considerable risk in jumping into this debate, reluctantly or not, in the heat of what is expected to be a close election. The day before he announced his position, voters in North Carolina — a critical state for Mr. Obama and the site of the Democratic convention this summer — approved by a 20-point margin a constitutional amendment banning same-sex marriage. It was the 31st state to pass such an amendment.
As George W. Bush demonstrated in 2004, when his campaign engineered initiatives against gay marriage in a series of swing states, opponents are far more likely to vote on these issues than supporters. Mitt Romney, the probable Republican presidential candidate, was quick to proclaim his opposition to gay marriage after Mr. Obama spoke. And however much national attitudes may be shifting, the issue remains highly contentious among black and Latino voters, two groups central to Mr. Obama’s success.
Yet as Mr. Obama has clearly come to recognize, the forces of history appear to be changing. The president was at risk of seeming politically timid and calculating, standing at the sidelines while a large number of Americans — including members of both parties — embraced gay marriage. That is a particularly discordant image, many Democrats said, for the man who was the nation’s first black president.
Mr. Obama’s declaration may have been belated and unplanned, forced out after his vice president, Joseph R. Biden Jr., during a television interview on Sunday declared his support for same-sex marriage. Still, it is a huge voice added to a chorus that has become increasingly robust, a reminder that a view that had once been relegated to the dark sidelines of political debate has become mainstream.
The very riskiness of what Mr. Obama did — some commentators were invoking Lyndon B. Johnson’s embrace of civil rights in 1964, with all the attendant political perils — made it hard to understate the historic significance of what took place at the White House on Wednesday.
“If you are one of those who care about this issue, you will not forget where you were when you saw the president deliver those remarks,” said Chad Griffin, the incoming president of the Human Rights Campaign, a gay advocacy group. “Regardless of how old you are, it’s the first time you have ever seen a president of the United States look into a camera and say that a gay person should be treated equally under the law. The message that that sends, to a young gay or transgender person struggling to come out, is life changing.”
It also was a reminder of just how quickly public and political attitudes are changing. The first organizers of the modern gay-rights movement, after the June 1969 raid on the Stonewall Inn in Greenwich Village in New York City, considered themselves bold in hoping they could pass nondiscrimination acts. They did not seriously contemplate a day when members of the same sex would be permitted to marry.
It has been only 16 years since Bill Clinton — the second Democratic presidential candidate to campaign before a gay audience at an event open to the news media — signed the Defense of Marriage Act, which defined marriage as the union of a man and a woman, permitting states to refuse to recognize same-sex marriages conducted in other states.
Mr. Clinton advocated the bill in the midst of a re-election campaign after his aides concluded that opposing it might be risky. Mr. Clinton has since said he regrets that decision; Mr. Obama instructed his Justice Department not to defend the act.
In some ways, Mr. Obama is late to the party. Mr. Biden was just the latest prominent Democrat to announce his support, and many now say that it seems unthinkable that by 2016 any serious Democratic presidential candidate would oppose gay marriage. A series of significant Republican figures — Ken Mehlman, the former Republican Party chairman, Theodore Olson, who was solicitor general under Mr. Bush — have also been active in pushing gay marriage.
The North Carolina vote in some ways distracts from what polling shows to be a steady increase in the percentage of Americans who say they support gay marriage or domestic partnerships; it is now a majority. The numbers are particularly high among younger Americans, suggesting that this is a wave likelier to grow than to recede.
All of which suggests that there are, in addition to the risks, clear potential upsides for Mr. Obama. His announcement, while symbolic rather than carrying the force of law, could energize big parts of his base, particularly younger voters, and reassure liberal Democrats who had been disappointed with Mr. Obama on this issue. It will no doubt help with gay people, already among his biggest donors.
And Mr. Obama’s announcement came as Mr. Romney has been seeking to shift to the middle; independent voters and women are two constituencies that tend to support gay marriage. Now, though, he is almost certainly going to face pressure from his base to take the fight on gay marriage to Mr. Obama.
“President Obama has now made the definition of marriage a defining issue in the presidential contest, especially in swing states like Ohio, North Carolina, Virginia, Florida and Nevada,” said Brian S. Brown, the president of the National Organization for Marriage.
In truth, Republicans and Democrats are hardly sure whether this will be a deciding issue in any state, given how pressing economic concerns are, particularly in the swing states.
Polls show that gay marriage is not a huge concern to swing voters. Is Mr. Romney really going to want to spend the next five months talking about gay marriage, rather than the economy and jobs? And Mr. Obama may be no more eager to discuss the issue further, to be drawn into the weeds of this argument.
Yet perhaps on this day, short-term political calculations are not what people are likely to recall in talking about Mr. Obama’s interview in years to come.
“I don’t think it’s about particular states or particular demographics,” said Steve Elmendorf, a Democratic strategist.
“He said the right thing,” he said. “He did the right thing. People are going to overanalyze the politics of this.”