President Barack Obama and Democratic presidential candidate Hillary Clinton on Friday trumpeted the Supreme Court's ruling that states can no longer ban gay marriage, with Obama calling the decision "a victory for America." Obama and Clinton's comments, however, stand in stark contrast to the views they have expressed in the past.

Participating at a candidates' forum on Aug. 16, 2008 at Saddleback Church in Lake Forest, Calif., then-candidate Obama was asked by Rev. Rick Warren to define marriage.

"I believe that marriage is the union between a man and a woman," Obama said. "Now, for me as a Christian, it's also a sacred union; God's in the mix."

Warren went on to ask the then-candidate whether or not he would support a Constitutional amendment that defined marriage as he had defined it in his previous response, but Obama simply answered, "No I would not."

"Because historically we have not defined marriage in our constitution," Obama explained during the event held at the evangelical megachurch aired by CNN (click here for the transcript). "It's been a matter of state law that has been our tradition. Let's break it down: The reason that people think there needs to be constitutional amendments, some people believe, is because of the concern about same-sex marriage. I am not someone who promotes same-sex marriage, but I do believe in civil unions. I do believe that we should not...for gay partners to want to visit each other in a hospital, for the state to say, you know what, that's alright, I don't think in any way inhibits my core beliefs about what marriage are. I think that my faith is strong enough, and my marriage is strong enough, that I could afford those civil rights to others, even if I have a different perspective or a different view."

Watch Obama answer Warren's questions about gay marriage in 2008 in the video below.

Clinton, Obama's former Secretary of State, has also flip-flopped on gay marriage. On Friday, she re-fashioned her "H" campaign logo with rainbow colors in support of the LGBT cause and voiced her approval of the Supreme Court's decision in a series of tweets, saying she was "Proud to celebrate a historic victory for marriage equality-& the courage & determination of LGBT Americans who made it possible."

Like Obama, however, today's comments bear little resemblance to her earlier stated views.

Sitting down for an interview and questions from the audience with host Chris Matthews during MSNBC's "Hardball College Tour" in Albany, N.Y., on Nov. 20, 2002, Matthews asked Clinton, then a U.S. Senator from New York, "Do you think New York state should recognize gay marriage?"

"No," she answered flatly, shaking her head as the audience booed her response.

You can watch Clinton and Matthews in the video below; gay marriage is addressed just after the 2-minute mark.

The Supreme Court on Friday ruled in a 5-4 split among justices in the case of Obergefell v. Hodges, a case which came to light in 2013 after the Supreme Court struck down the Defense of Marriage Act.