Thousands march along Market Street during the annual Gay Pride parade in San Francisco, California on June 28, 2015, two days after the US Supreme Court's landmark ruling legalizing same-sex marriage nationwide. (JOSH EDELSON / AFP PHOTO)
WASHINGTON – The US Senate passed a bill on Tuesday that would protect federal recognition of same-sex marriage, a measure taken up in response to worries the Supreme Court could overturn a 2015 decision that legalized it nationwide.
The narrowly tailored bill, which would require the federal government to recognize a marriage if it was legal in the state in which it was performed, is meant to be a backstop if the Supreme Court acted against same-sex marriage.
The bill was passed 61 to 36, with 60 votes needed for passage. Twelve Republicans joined 49 Democrats in supporting the bill
It would not bar states from blocking same-sex or interracial marriages if the Supreme Court allowed them to do so.
ALSO READ: Japan court rules same-sex marriage ban constitutional
"Today the long but inexorable march towards greater equality advances forward," Senate Majority Leader Chuck Schumer said in a statement.
"By passing this bill, the Senate is sending a message that every American needs to hear: no matter who you are or who you love, you too deserve dignity and equal treatment under the law."
The bill was passed 61 to 36, with 60 votes needed for passage. Twelve Republicans joined 49 Democrats in supporting the bill. One Democrat, Georgia's Raphael Warnock, was absent, as were two Republican senators.
READ MORE: S'pore repeals gay sex ban but limits prospect of same-sex marriage
A similar, but not identical, bill passed the House of Representatives earlier this year with support from 47 Republicans and all Democrats. The House would need to approve the Senate version before it is sent to President Joe Biden to sign into law.
No 2 House Democrat Steny Hoyer told reporters on Tuesday the House would likely take up the Senate's version of the bill next week.
ALSO READ: Switzerland votes to make same-sex marriage legal
In June, the Supreme Court overturned the nationwide right to an abortion, undoing 50 years of precedent.
In a concurring opinion, Supreme Court Justice Clarence Thomas wrote the court should consider reversing other decisions protecting individual freedoms, including the 2015 ruling on gay marriage.
About 568,000 married same-sex couples live in the United States, according to the US Census Bureau.