WASHINGTON — The House on Tuesday passed a bill that would recognize same-sex marriages at the federal level, as 47 Republicans joined Democrats in support of a measure responding to growing fears that a conservative Supreme Court could nullify marriage equality.
The Respect for Marriage Act would codify the federal protections for same-sex couples that were put in place in 2015, when the Supreme Court ruling in Obergefell v. Hodges established same-sex marriage as a right under the 14th Amendment. The legislation would repeal the Defense of Marriage Act of 1996, which defined a marriage as the union between a man and a woman, a law that was struck down by Obergefell but has remained on the books.
The legislation, which passed in a vote of 267 to 157, faces an uncertain future in the evenly divided Senate, where most Republicans have opposed gay rights measures. But Senator Mitch McConnell, Republican of Kentucky and the minority leader, declined on Tuesday to state a position on the measure.
House Democratic leaders opted to move forward with the bill after a Supreme Court opinion last month overturning abortion rights suggested that the justices might revisit cases that legalized gay marriage and contraceptive rights. The debate in Congress thrust the issue into the midterm election campaign, where Democrats are eager to draw a distinction between their party’s support for L.G.B.T.Q. rights and opposition by many Republicans.
In the Senate, Chuck Schumer, Democrat of New York and the majority leader, did not commit to bringing up the measure but said he was “going to look at everything that we can do to deal with these issues” following the Dobbs decision.
“Let’s face it: This is a MAGA Supreme Court — a MAGA, right-wing extremist Supreme Court — very, very far away from not only where the average American is, but even the average Republican,” Mr. Schumer said.
Justice Samuel A. Alito Jr., who wrote the court’s decision in the case of Dobbs v. Jackson Women’s Health Organization, said the ruling should not be read as affecting issues other than abortion. But in a concurring opinion, Justice Clarence Thomas made clear that he thought that other landmark cases that relied on the 14th Amendment, as the nearly 50-year-old Roe v. Wade precedent did, should be reconsidered. And Justice Alito has suggested before that Obergefell should be revisited, arguing that it invented a right with no basis in the text of the Constitution.
The legislation would mandate that the federal government recognize a marriage if it was valid in the state where it was performed, which would address the patchwork of differing state laws. That would protect same-sex marriages in the roughly 30 states that currently prohibit it, should the court overturn Obergefell.
The bill also would provide additional legal protections to same-sex couples, such as giving the attorney general the authority to pursue enforcement actions and ensuring that all states recognize the public acts, records and judicial proceedings for out-of-state marriages.
“Today, we take an important step towards protecting the many families and children who rely on the rights and privileges underpinned by the constitutional guarantee of marriage equality,” Representative Jerrold Nadler, Democrat of New York and the chairman of the Judiciary Committee, said in a statement. “The Respect for Marriage Act will further add stability and certainty for these children and families.”
The White House issued a statement on Tuesday in support of the bill, a version of which is co-sponsored by Senator Susan Collins, Republican of Maine.
The House vote reflected a shift among Republicans on same-sex marriage as public opinion polls have shown that a majority of the party supports it. While the vast majority of House Republicans opposed the bill, G.O.P. leaders did not officially instruct their members to vote no, according to two people familiar with the internal discussions, making the vote more a matter of personal conscience.
The small bloc of Republicans that supported the measure amounted to less than a quarter of the party conference, but that was a far greater proportion than gay rights legislation has drawn in the past from G.O.P. lawmakers. Only three Republicans voted last year for sweeping legislation that would prohibit discrimination based on sex, sexual orientation and gender identity.
Tim Lindberg, an assistant professor at the University of Minnesota Morris, said there has been a shift in perception on L.G.B.T.Q. rights throughout the country, and on same-sex marriage in particular.
“There is no risk in supporting it, but there’s a political liability if you go too far right,” Mr. Lindberg said regarding same-sex marriage rights. “It’s not a measuring stick for whether you’re a conservative anymore.”
Last fall, Representative Liz Cheney, Republican of Wyoming, a staunch conservative, dropped her longstanding opposition to same-sex marriage, saying, “I was wrong.” On Tuesday, Ms. Cheney, whose sister Mary Cheney is gay and married with children, voted to codify same-sex marriage protections.
Representative Nicole Malliotakis of New York, another Republican who backed the bill, said in a statement that she still feels remorse for opposing same-sex marriage more than a decade ago as a state legislator.
“In 2017, I expressed my deep regret for voting against a bill legalizing same-sex marriage in New York State while in the State Assembly six years prior,” Ms. Malliotakis said. “Every legislator has votes they regret, and to this day, that vote was one of the most difficult I’ve had to take.”
Representative Nancy Mace, Republican of South Carolina, who has previously supported gay marriage, said she backed the measure because it was “constitutionally sound.”
“If this gives some peace of mind to ensure the institution of marriage is protected, then that’s what I’ll vote for,” Ms. Mace said.
But most Republicans were opposed. Representative Jim Jordan of Ohio, the ranking member of the Judiciary Committee, said the measure was a bid by Democrats to delegitimize the Supreme Court.
“We are debating this bill today because it is an election year,” Mr. Jordan said. “We are here for political messaging.”
Mr. Nadler contended the legislation was a necessary response to Dobbs. Even if lawmakers accepted Justice Alito’s contention that the decision had no implications for other rights, he said, the legislation was a way for Congress to “provide additional reassurance that marriage equality is a matter of settled law.”