Sen. Mark Warner (D-Va.) has announced his support for gay marriage, making him the second Democratic senator to announce his support Monday, a day before the Supreme Court is set to hear oral arguments on the topic.

Warner was one of 40 senators to sign on to an amicus brief to the Supreme Court asking it to overturn a federal ban on gay marriage. He previously had not been supportive of same-sex marriage.

“I support marriage equality because it is the fair and right thing to do," Warner said in a statement on his Facebook page. "Like many Virginians and Americans, my views on gay marriage have evolved, and this is the inevitable extension of my efforts to promote equality and opportunity for everyone. I was proud to be the first Virginia governor to extend anti-discrimination protections to LGBT state workers. In 2010, I supported an end to the military’s ‘don’t ask, don’t tell’ policy, and earlier this month I signed an amicus brief urging the repeal of DOMA. I believe we should continue working to expand equal rights and opportunities for all Americans.”

Earlier Monday, Sen. Claire McCaskill (D-Mo.), another Democrat in a swing state, announced her support for gay marriage.

Warner's support is notable because he's up for reelection in 2014 and also because he's considered a potential presidential contender in 2016. Almost all of the top contenders for the Democratic nomination in 2016 now support gay marriage, including Vice President Biden, New York Gov. Andrew Cuomo, Maryland Gov. Martin O'Malley and former secretary of state Hillary Clinton, who announced her support last week.

A recent Washington Post poll in Virginia showed 49 percent supported gay marriage, while 40 percent opposed it. Voters banned gay marriage in 2006, by a margin of 57-43.

Warner has long been popular in his home state, with an approval rating that has often been in the 60s. He is not considered a top Republican target in 2014.