As supporters praise U.S. President Barack Obama for coming out in full support of same-sex marriage, critics accuse him of shifting positions and being politically opportunistic.

On Wednesday, Obama told an interviewer that his family inspired him to change his perspective on the issue.

His two daughters, Malia and Sasha, have friends whose parents are in same-sex relationships, he said, recalling their dismay they might be treated differently than the President and First Lady.

"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 correspondent Robin Roberts.

The statement puts Obama on the record as the first sitting U.S. president to publicly support the marriage of same-sex couples.

Asked for his reaction at a campaign event in Oklahoma City, Republican presidential nomination frontrunner Mitt Romney stood by his view that marriage be reserved for the union of a man and a woman.

"This is a very tender and sensitive topic, as are many social issues, but I have the same view that I've had since -- since running for office," Romney said, referring to his first gubernatorial election campaign in 1994, years before his election as governor of Massachusetts in 2002.

"My view is that marriage itself is between a man and a woman," he said, explaining that he believes the issue should be handled at the state level.

Romney stopped short of accusing Obama of flip-flopping, suggesting instead that news reports indicated the president had "shifted" his stance.

Watching developments in Washington, NBC reporter John Harwood said Romney has to tread carefully as he's been accused of his own social issue flip-flops in the past.

By treading carefully, Harwood told CTV's Canada AM on Thursday, "this may help him neutralize that issue."

Ten states have bans on same-sex marriage, including North Carolina where voters passed an amendment this week adding the ban to their state constitution. Six states and the District of Columbia allow gay marriage, while Washington state and Maryland have voted in favour, but not yet passed laws as they await referendum results.

But polls show public opinion is quickly swinging in favour of same-sex marriages, particularly among young people and women. A recent Gallup poll, for example, found 50 per cent of respondents in favour of same-sex marriage.

Harwood said the president is still sticking his neck out politically.

"I do think it's a dicey move," Harwood told Canada AM.

"There is a plurality support for legal gay marriage, but the question is where is that support located and are the poeple who are mobilized and motivated by this, do they outweight the opponents who are also mobilized by this?"

Besides North Carolina, Harwood says the issue could have a bearing on how voters swing in the run-up to the presidential election.

"Virginia, Ohio, Michigan, Pennsylvania, Wisconsin -- all these places where you have a lot of culturally conservative, blue-collar voters that the administration has been trying to mobilize," he said.

Romney, who has state his support for extending limited civil benefits to same-sex couples, had a problem in those states too when contrasted against his more socially conservative Republican rivals at the time.

"His ability to attract those voters may have gotten a boost because of the president's move," Harwood added.

As pollsters get a grip on public reaction, advocates on both sides of the issue highlight how divisive it can still be.

Executive director of the U.S. National Gay and Lesbian Task Force Rea Carey praised the president "for making history.

"Who benefits? Millions of families who now know that their country's leader believes in fairness for all. This is a great day for America," Carey said in a statement.

In his own statement, the president of the U.S. National Organization for Marriage Brian Brown said Obama had made same-sex marriage a "defining issue" on which he hopes to squash his re-election campaign.

"God is the author of marriage, and we will not let an activist politician like Barack Obama who is beholden to gay marriage activists for campaign financing to turn marriage into something political that can be redefined according to presidential whim," Brown said.

In his interview Wednesday, Obama said his views on gay marriage were his own, and that he agrees it falls under state jurisdiction.

Obama's announcement came just days after his Vice President Joe Biden said on a Sunday morning TV talk show that he is "absolutely comfortable" with same-sex couples marrying and receiving the same civil rights and liberties as heterosexual couples.

The next day, when Obama's longtime friend Education Secretary Arne Duncan was asked on a morning talk show whether he believed gay couple should be allowed to wed, he answered simply: "Yes, I do."

In 1996, Obama expressed support for gay marriage in a questionnaire he had to complete as a state Senate candidate. He seemed to reverse course when he ran for the U.S. Senate in 2004, saying he believed that marriage should be between a man and a woman.

Speaking on condition of anonymity, sources in the White House told The Associated Press that earlier this year Obama had decided to express his support for married gay couples ahead of the Democratic convention, but his plans were accelerated in the wake of Biden's "impromptu" remarks.