In a stark reversal of what he's previously said about how his faith informs his views on same-sex marriage, President Barack Obama prominently cited his Christian background in a major ABC News interview on Wednesday where he came out forcefully in support of legalizing same-sex marriage.

Speaking for himself and First Lady Michelle Obama on Wednesday, the president said he has changed his views since last famously saying he was "evolving" on how he feels about same-sex marriage.

This is something that, you know, we’ve talked about over the years and she, you know, she feels the same way, she feels the same way that I do. And that is that, in the end the values that I care most deeply about and she cares most deeply about is how we treat other people and, I, you know, we are both practicing Christians and obviously this position may be considered to put us at odds with the views of others.

But, you know, when we think about our faith, the thing at root that we think about is, not only Christ sacrificing himself on our behalf, but it’s also the Golden Rule, you know, treat others the way you would want to be treated. And I think that’s what we try to impart to our kids and that’s what motivates me as president and I figure the most consistent I can be in being true to those precepts, the better I’ll be as a as a dad and a husband and hopefully the better I’ll be as president.

The quote contrasts with his 2004 interview with WTTW, a Chicago public television station, in which he invoked religion to come out against same-sex marriage but for civil unions.

"What I believe, in my faith, is that a man and a woman, when they get married, are performing something before God, and it’s not simply the two persons who are meeting,” said Obama, who was then campaigning to represent Illinois in the Senate.

While not directly addressing religion, Obama also hinted at it in October 2010 at a meeting with five progressive bloggers where he said he had "been to this point unwilling to sign on to same-sex marriage primarily because of my understandings of the traditional definitions of marriage."

Religious proponents of same-sex marriage legalization and those against gay marriage quickly seized upon Obama's Wednesday's remarks.

The Rev. C. Welton Gaddy, president of the Interfaith Alliance and a pastor at Northminster (Baptist) Church in Monroe, La., applauded Obama's decision but said faith should not be what influences his position.

"President Obama’s affirmation of the right to same gender marriage today is an important and historic moment in the life of the nation. His statement shows that he understands his role is to protect Constitutional principles over sectarian ideology. While I appreciate that the president thinks his position is consistent with his faith –- a belief I have long held -– it is the Constitution, not his religion that should form the basis of his position," Gaddy said in a statement.

Ralph Reed, a prominent Christian Republican strategist and founder of the Faith and Freedom Coalition, said Obama's support of same-sex marriage will fuel conservative religious voters to vote against him in the November election.

"At a time of high unemployment and severe economic distress, President Obama chose the week he launched his re-election campaign to flip-flop on same-sex marriage. Combined with his administration’s opposition to the Defense of Marriage Act, it reveals a president who is tone-deaf and out-of-touch with the time-honored values of millions of Americans," Reed said in a statement. "This is an unanticipated gift to the Romney campaign. It is certain to fuel a record turnout of voters of faith to the polls this November."

Brian Brown, president of the National Organization for Marriage, said in a statement that "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."

The president's position now puts him in direct conflict with major influential religious groups, including the United States Conference of Catholic Bishops, that have come out against legalizing same-sex marriage. At the same time, as several polls have shown, his remarks also put him better in touch with the views of many younger voters, including religious ones, who are more likely to favor same-sex marriage than older generations.

Obama's support of same-sex marriage legalization on Wednesday was not the first time he has supported the cause. In a February 1996 written statement in response to a questionnaire from the Chicago-based LGBT newspaper "Outlines," Obama wrote "I favor legalizing same-sex marriages, and would fight efforts to prohibit such marriages." At the time, Obama was running for Illinois state Senate. In June 2011, White House Communications Director Dan Pfeiffer said the response wasn't from Obama and that the questionnaire was “actually filled out by someone else.”

Update: Cardinal Timothy Dolan of the United States Conference of Catholic Bishops, has released a strongly worded statement against Obama's announcement. Other religious groups, including the United Synagogue of Conservative Judaism and the Religious Action Center of Reform Judaism, have come out in support of Obama. Dolan's remarks are below.

President Obama’s comments today in support of the redefinition of marriage are deeply saddening... we cannot be silent in the face of words or actions that would undermine the institution of marriage, the very cornerstone of our society. The people of this country, especially our children, deserve better. Unfortunately, President Obama’s words today are not surprising since they follow upon various actions already taken by his Administration that erode or ignore the unique meaning of marriage. I pray for the President every day, and will continue to pray that he and his Administration act justly to uphold and protect marriage as the union of one man and one woman. May we all work to promote and protect marriage and by so doing serve the true good of all persons.