(CNN)The Democrat-led House of Representatives on Tuesday voted to pass a bill that would enshrine protections for same-sex marriage into federal law.
The bipartisan final vote was 267 to 157 with 47 Republicans joining with Democrats to vote for the bill. It's not clear, however, whether the bill can pass the Senate where at least 10 Republicans would need to join with Democrats to overcome the filibuster's 60-vote threshold.
The vote comes amid fears among Democrats that the conservative majority on the Supreme Court could take aim at same-sex marriage in the future, after the high court overturned Roe v. Wade in a highly consequential reversal of longstanding legal precedent.
The bill -- called the Respect for Marriage Act -- was introduced by Democratic Rep. Jerry Nadler of New York, the chair of the House Judiciary Committee.
In addition to safeguarding the right to same-sex marriage nationwide, the bill also includes federal protections for interracial marriages. The measure holds that a marriage must be recognized under federal law if the marriage was legal in the state where it took place.
The bill would also enact additional legal safeguards for married couples intended to prevent discrimination on the basis of sex, race, ethnicity or national origin, including empowering the attorney general to pursue enforcement actions.
House Majority Leader Steny Hoyer said in a statement on the vote, "it is critical to ensure that federal law protects those whose constitutional rights might be threatened by Republican-controlled state legislatures. LGBTQ Americans and those in interracial marriages deserve to have certainty that they will continue to have their right to equal marriage recognized, no matter where they live."
House Republican leaders were not planning to whip their members to vote against the bill, a GOP source told CNN ahead of the vote.
House Democrats, leaning into cultural issues in the aftermath of the Supreme Court's abortion decision, also are looking at moving a bill this week to guarantee access to contraception.
The Supreme Court's bombshell opinion overturning Roe v. Wade has set off a debate over whether other precedents are now in danger.
The majority opinion from Justice Samuel Alito attempted to wall off its holding in the abortion case from those other rulings, but Justice Clarence Thomas wrote separately to call explicitly for other rulings to be revisited.
"In future cases, we should reconsider all of this Court's substantive due process precedents, including Griswold, Lawrence, and Obergefell," Thomas wrote, referring to decisions on contraception and same-sex relationships.
Liberals have said that those rulings are now at risk.
In their dissent, the court's three liberal justices wrote "no one should be confident that this majority is done with its work."
"The right Roe and Casey recognized does not stand alone," they wrote. "To the contrary, the Court has linked it for decades to other settled freedoms involving bodily integrity, familial relationships, and procreation. Most obviously, the right to terminate a pregnancy arose straight out of the right to purchase and use contraception. In turn, those rights led, more recently, to rights of same-sex intimacy and marriage."
The liberals added: "Either the mass of the majority's opinion is hypocrisy, or additional constitutional rights are under threat. It is one or the other."
In a letter to House Democrats, House Speaker Nancy Pelosi previewed the House votes related to same-sex marriage and contraception as a counter to the Supreme Court.
"This week, the House will pass two more bills to protect freedom in our nation, as extremist Justices and lawmakers take aim at more of our basic rights," she wrote. "Our Right to Contraception Act will preserve the essential protections found in Griswold v. Connecticut. Our Respect for Marriage Act -- which, proudly, is bipartisan and bicameral -- will defend the right to marry whomever you love, as found in Obergefell v. Hodges and Loving v. Virginia."
This story and headline have been updated to reflect additional developments Tuesday.