WASHINGTON (AP) — The U.S. House overwhelmingly approved legislation Tuesday to protect same-sex and interracial marriages amid concerns that the Supreme Court ruling overturning Roe v. Wade abortion access could jeopardize other rights criticized by many conservative Americans.

In a robust but lopsided debate, Democrats argued intensely in favor of enshrining marriage equality in federal law, while Republicans steered clear of openly rejecting gay marriage. Instead leading Republicans portrayed the bill as unnecessary amid other issues facing the nation.

Tuesday’s election-year roll call, 267-157, was partly political strategy, forcing all House members, Republicans and Democrats, to go on the record with their views. It also reflected the legislative branch pushing back against an aggressive court that has sparked fears it may revisit apparently settled U.S. laws.

“For me, this is personal,” said Rep. Mondaire Jones, D-N.Y., who said he was among the openly gay members of the House.

“Imagine telling the next generation of Americans, my generation, we no longer have the right to marry,” he said. “Congress can’t allow that to happen.”

Wary of political fallout, GOP leaders did not direct their lawmakers to hold the party line against the bill, aides said. Dozens of Republicans joined Democrats in voting for passage.

While the Respect for Marriage Act is expected to pass the House, with a Democratic majority, it is almost certain to stall in the evenly split Senate, where most Republicans would likely join a filibuster to block it. It’s one of several bills, including those enshrining abortion access, that Democrats are proposing to confront the court’s conservative majority. Another bill, guaranteeing access to contraceptive services, is set for a vote later this week.

The Biden administration issued a statement of support for the marriage bill.

Polling shows a majority of Americans favor preserving rights to marry whom one wishes, regardless of the person’s sex, gender, race or ethnicity, a long-building shift in modern mores toward inclusion.

A Gallup poll in June showed broad and increasing support for same-sex marriage, with 70% of U.S. adults saying they think such unions should be recognized by law as valid. The poll showed majority support among both Democrats (83%) and Republicans (55%).

Approval of interracial marriage in the U.S. hit a six-decade high at 94% in September, according to Gallup.

“The extremist right-wing majority on the Supreme Court has put our country down a perilous path,” said Rep. Mary Gay Scanlon, D-Pa., in a floor speech setting Tuesday’s process in motion.

“It’s time for our colleagues across the aisle to stand up and be counted. Will they vote to protect these fundamental freedoms? Or will they vote to let states take those freedoms away?”

But Republicans insisted Tuesday that the court was only focused on abortion access in June when it struck down the nearly 50-year-old Roe v. Wade ruling, and they argued that same-sex marriage and other rights were not threatened.

In fact, of all the Republicans who rose to speak during the morning debate, almost none directly broached the subject of same-sex or interracial marriage.

“We are here for a political charade, we are here for political messaging,” said Rep. Jim Jordan of Ohio, the top Republican on the Judiciary Committee.

As several Democrats spoke of inequalities they said that they or their loved ones had faced in same-sex marriages, the Republicans talked about rising gas prices, inflation and crime, including recent threats to justices in connection with the abortion ruling.

Even as it passed the House with Republican votes, the outcome in the Senate is uncertain.

“I’m probably not inclined to support it,” said Sen. Josh Hawley, R-Mo. “The predicate of this is just wrong. I don’t think the Supreme Court is going to overturn any of that stuff.”

For Republicans in Congress the Trump-era confirmation of conservative justices to the Supreme Court fulfilled a long-term GOP goal of revisiting many social, environmental and regulatory issues the party has been unable to tackle on its own by passing bills that could be signed into law.

But in a notable silence, Senate Republican leader Mitch McConnell declined to express his view on the bill, leaving an open question over how strongly his party would fight it, if it even comes up for a vote in the upper chamber.

“I don’t see anything behind this right now other than, you know, election year politics,” said the GOP whip, Sen. John Thune of South Dakota.

The Respect for Marriage Act would repeal a law from the Clinton era that defines marriage as a heterogeneous relationship between a man and a woman. It would also provide legal protections for interracial marriages by prohibiting any state from denying out-of-state marriage licenses and benefits on the basis of sex, race, ethnicity or national origin.

The 1996 law, the Defense of Marriage Act, had basically been sidelined by Obama-era court rulings, including Obergefell v. Hodges, which established the rights of same-sex couples to marry nationwide, a landmark case for gay rights.

But last month, writing for the majority in overturning Roe v. Wade, Justice Samuel Alito argued for a more narrow interpretation of the rights guaranteed to Americans, noting that the right to an abortion was not spelled out in the Constitution.

In a concurring opinion, Justice Clarence Thomas went further, saying other rulings similar to Roe, including those around same-sex marriage and the right for couples to use contraception, should be reconsidered.

While Alito insisted in the majority opinion that “this decision concerns the constitutional right to abortion and no other right,” others have taken notice.

“The MAGA radicals that are taking over the Republican Party have made it abundantly clear they are not satisfied with repealing Roe,” said Senate Majority Leader Chuck Schumer, D-N.Y., referring to Trump’s backers.

He pointed to comments from Sen. Ted Cruz, R-Texas, who said over the weekend that the Supreme Court’s decision protecting marriage equality was “clearly wrong” and state legislatures should visit the issue.

But Schumer did not commit to holding a vote on the bill.

Jim Obergefell, the plaintiff in the landmark ruling legalizing same-sex marriage and now running as a Democrat for the Ohio House, said after the court’s ruling on abortion, “When we lose one right that we have relied on and enjoyed, other rights are at risk.”