Updated

President Obama on Wednesday endorsed same-sex marriages, becoming the first sitting U.S. president to take that position following days of speculation about his "evolving" stance on the issue.

The president used a hastily called TV interview to make his position clear.

"At a certain point, I've just concluded that for me personally, it is important for me to go ahead and affirm that I think same-sex couples should be able to get married," Obama told ABC News.

The president, who was previously opposed to the unions, explained that he's gone through an "evolution." Obama said he initially thought civil unions would suffice as a vehicle to give same-sex couples the rights commensurate with those of heterosexual couples. "I'd hesitated on gay marriage in part because I thought civil unions would be sufficient," he said.

But he said his position evolved over the years, "as I have talked to friends and family and neighbors, when I think about members of my own staff who are in incredibly committed monogamous relationships, same-sex relationships, who are raising kids together, when I think about those soldiers or airmen or Marines or sailors who are out there fighting on my behalf and yet feel constrained, even now that 'don't ask, don't tell' is gone, because they are not able to commit themselves in a marriage."

More On This...

[pullquote]

The statement follows days of speculation about his stance. Vice President Biden effectively touched off those questions when, in a Sunday show interview, he expressed support for same-sex marriages. Education Secretary Arne Duncan the next day said he is in favor of the unions. Drawing more attention to the issue, voters in North Carolina on Tuesday approved a state constitutional amendment banning gay marriage.

Seniors officials told Fox News that Obama was always planning to come out in favor of same-sex marriage before the election, even before the Democratic National Convention. But advisers had not nailed down the timing of that announcement. The officials acknowledged that Biden's comments sped up the timetable dramatically, and that the vice president's remarks were not part of an orchestrated roll-out of the president's position -- in other words, the president was not planning to address the issue this week.

Obama's decision was met with immediate praise by gay advocacy groups. "President Obama's 'evolution' is now complete. Congratulations, Mr. President, for making history today by becoming the first sitting president to explicitly support marriage for same-sex couples," said Rea Carey, director of the National Gay and Lesbian Task Force.

Yet the endorsement entails political risk, particularly among independents who were vital to Obama's 2008 victory and even socially conservative black Democrats. While the list of states that allow gay marriage is growing, a total of 30 states have constitutional amendments or laws barring those partnerships or both.

Those states, several of them battlegrounds in November, are worth a total of 309 electoral votes in the presidential general election -- it takes 270 to win.

Senior officials said they're not sure how the announcement Wednesday will play politically, but they downplayed the idea that it would depress turnout among black voters. They plan on demonstrating a stark contrast with presumptive Republican nominee Mitt Romney on the issue.

Conservatives meanwhile pilloried Obama on Wednesday, with former GOP presidential candidate Rick Santorum accusing the president of putting on a "charade" all this time.

"The charade is now over, no doubt an attempt to galvanize his core hard left supporters in advance of the November election," Santorum said.

Romney, asked about the president's statements, said that his view remains the same. "I believe that marriage is a relationship between a man and a woman," he said. "States are able to make decisions with regards to domestic partnership benefits, such as hospital visitation rights, benefits and so forth ... but my view is that marriage itself is between a man and a woman, and that's my own preference."

The Republican Party also reiterated its opposition to gay marriage after Obama's statement.

"While President Obama has played politics on this issue, the Republican Party and our presumptive nominee Mitt Romney have been clear. We support maintaining marriage between one man and one woman and would oppose any attempts to change that," Republican National Committee Chairman Reince Priebus said.

Obama said Wednesday that he's tried to stay "sensitive" to the fact that for many people "the word marriage was something that evokes a very powerful tradition." He also reportedly said he still thinks states should be able to decide the issue.

Obama actually expressed support for same-sex marriages during a 1996 race for Illinois state Senate. He later backed off that support, stating during the 2008 presidential campaign that he believes marriage is between a man and a woman. Later in his presidency, Obama had said he was "evolving" on the issue.

At the same time, Obama pushed to repeal the "don't ask, don't tell" policy barring gays from serving openly in the military. And his Justice Department stopped defending the Defense of Marriage Act defining marriage as between a man and woman.

As Obama's personal beliefs came under scrutiny in recent days, his aides repeatedly pointed to those two stances to argue that he's in favor of gay rights -- without putting the president on record for or against gay marriage.

Obama, in additional segments from the ABC interview, noted that much of the debate is "generational," saying his daughters have friends whose parents are same-sex couples.

"It doesn't make sense to them" that their friends parents "would be treated differently," Obama said.

He and first lady Michelle Obama are practicing Christians, he said, "and obvioulsy this position may put us at odds with others, but when we think about our faith, the thing at root (is) not just Christ's sacrifice on our behalf, but the golden rule, treat others the way you want to be treated."

Fox News' Ed Henry contributed to this report.