Former Maine senator Olympia Snowe, a moderate Republican, revealed Friday that she supports gay marriage and backed a ballot measure legalizing same-sex unions in her state last fall.

Olympia Snowe now backs gay marriage. (Associated Press)

"I think obviously this has evolved over time on the whole issue for the whole country," Snowe told CNN. "I think what we're seeing is, I think, changing societal conventions, that ultimately you see the transformation of society's gradual thinking and evolving on issues. I think we're seeing those sea changes on this particular question."

She no longer supports the Defense of Marriage Act barring federal recognition of gay marriage, a law she voted for in 1996 that is now being considered by the Supreme Court.

Snowe retired last fall after three terms, saying the "dysfunction and political polarization" in Congress could only be dealt with from outside the Capitol.

Before the election, the then-senator declined to take a position on Maine's ballot measure legalizing gay marriage, telling reporters that “it is left to individual states through the legislature or referenda to make their own determinations on this personal issue."

The ballot initiative passed, three years after the state voted to nullify a legislative attempt to legalize gay marriage.

Only two Republicans currently in the Senate have backed gay marriage — Mark Kirk of Illinois and Rob Portman of Ohio. All but four sitting Democratic senators have.