Updated

Wednesday afternoon, Barack Obama became the first president of the United States to openly support same sex marriage – declaring unequivocal support for gay marriage in an interview with ABC News.

His surprise endorsement reflects the position being echoed by the Obama administration that the forces of history appear to be changing and the public opinion tide has turned in favor of same-sex marriage – as evidenced by a Gallup survey released last week that showed 50 percent of Americans supporting legalized gay marriage, with just 48 percent opposing it.

To be sure, this announcement was a political move for the Obama  2012 reelection campaign which is now aggressively seeking to use his endorsement to mobilize a major grassroots get-out-the-vote initiative and energize huge swaths of the party’s liberal and progressive base, as well as young people and independent voters, many of whom back gay marriage.

And with the Obama reelection campaign increasingly relying on donations form the gay community in its fundraising efforts, publicly declaring his support for gay marriage hours before he headed to Hollywood Thursday night for a fundraiser at the home of A-list actor George Clooney was a strategic and shrewdly timed move by Mr. Obama.

But it is a move that is also politically problematic – and one that could very well cost him some swing states.

Put simply, the issue of gay marriage remains highly contentious in a number of swing states: a majority of voters in North Carolina, Ohio, Virginia, and Florida continue to be against same sex marriage.

The state-by-state data from polling conducted by Public Policy Polling show that a majority of voters in key swing-states like Virginia (53%-34%), Florida (53%-37%), North Carolina (61%-31%), Wisconsin (50%-30%) and Ohio (52%-32%) oppose the legalization of gay marriage.

And according to a recent Pew poll, one in three Southern swing voters are strongly opposed to gay marriage.

All of this in light of the fact that ballot measures to legalize gay marriage have been rejected by voters nearly every time over the course of fifteen years by voters in more than 30 states — often by large margins.

Among the 30 states that have constitutional amendments banning same-sex marriages are key battleground swing-states like Florida, Ohio, Virginia, Colorado, Pennsylvania, Michigan, and North Carolina. These states have a combined 114 electoral votes up for grabs.

In light of these numbers, while yesterday's move may be a political winner for President Obama among his progressive base, it may very well cost him the support of swing voters whose vote will be central to his success in winning reelection.