Sen. Claire McCaskillClaire Conner McCaskillKoch-backed group launches six-figure ad buy against Heitkamp GOP Senate candidate slams McCaskill over Clinton ties Dems meddle against Illinois governor ahead of GOP primary MORE (D-Mo.) announced her support for same-sex marriage Sunday night, becoming one of the first Democratic senators from a traditionally Republican state to do so.

McCaskill's statement, posted to her Tumblr page, precedes oral arguments at the Supreme Court on Tuesday and Wednesday on a pair of cases examining states' and the federal government's ability to define marriage as between a man and a woman.

"I have come to the conclusion that our government should not limit the right to marry based on who you love," McCaskill wrote. "While churches should never be required to conduct marriages outside of their religious beliefs, neither should the government tell people who they have a right to marry."

McCaskill, who was reelected to a second term in the Senate last year, joins a growing number of lawmakers advocating for same-sex marriage. Earlier this month, Republican Sen. Rob PortmanRobert (Rob) Jones PortmanLawmakers introduce bipartisan bill to speed up infrastructure permitting Overnight Tech: Zuckerberg breaks silence on Cambridge Analytica controversy | Senate passes sex trafficking bill | EU pushes new tax on tech | YouTube toughens rules on gun videos Senate passes controversial online sex trafficking bill MORE (Ohio) switched his position in favor of same-sex marriage, citing his college-aged son who is gay.

Former Secretary of State Hillary ClintonHillary Diane Rodham ClintonWhite House would like to see Biden ‘in the boxing ring’ in 2020 House Judiciary chair subpoenas DOJ for FBI documents The suit to make Electoral College more ‘fair’ could make it worse MORE made a splashy endorsement of gay marriage last week, reflecting the broader shift the Democratic Party has made on the issue in recent years. 

In her post, McCaskill says she was influenced by friends and colleagues in committed, same-sex relationships.

"My views on this subject have changed over time, but as many of my gay and lesbian friends, colleagues and staff embrace long term committed relationships, I find myself unable to look them in the eye without honestly confronting this uncomfortable inequality," McCaskill wrote. "Supporting marriage equality for gay and lesbian couples is simply the right thing to do for our country, a country founded on the principals of liberty and equality."

She also acknowledges that attitudes on gay marriage seem to be shifting. A Washington Post / ABC News poll released last week showed that 58 percent of Americans backed gay marriage, an all-time high.

"Good people disagree with me," McCaskill said. "On the other hand, my children have a hard time understanding why this is even controversial. I think history will agree with my children."