WASHINGTON - The House passed legislation Thursday that enshrines federal protections for marriages of same-sex and interracial couples.
The vote of 258-169 sends the Respect for Marriage Act to President Joe Biden, who praised Congress for passing the bill and is expected to sign it into law. It comes after the Senate passed the same bill last week by a vote of 61-36.
Democrats were unified in favor of the bill, while most Republicans in both chambers voted against it. Thirty-nine House Republicans supported the legislation Thursday and one voted present.
"Your love is your choice," House Majority Leader Steny Hoyer, D-Md., said on the floor Thursday, saying there is "no reason" to believe that Republican appointees on the Supreme Court won't want to revisit precedents on LGBTQ rights after overturning Roe v. Wade. "The pursuit of happiness means you can love whom you choose."
"I am shocked that conservatives that have a libertarian bent believe that somehow we ought to get involved in this," he said. "It's not the government's business."
The legislation - led by Sen. Tammy Baldwin, D-Wis., the first openly gay person elected to the Senate - would assure that the federal government recognizes marriages that were validly performed and guarantee full benefits "regardless of the couple's sex, race, ethnicity, or national origin." It would not, however, require states to issue marriage licenses contrary to state law.
House Speaker Nancy Pelosi was present to gavel down the vote and announce the bill's passage. Loud applause broke out on the Democratic side of the chamber, while a few Republicans joined in clapping.
The bill was amended in response to Senate GOP demands. It clarified that religious organizations won't be required to perform same-sex marriages and that government will not be forced to protect polygamous marriages.
The revisions to the bill meant the House had to vote again after passing an earlier version in July.
Former Rep. Barney Frank, D-Mass., the first openly gay member of Congress, attended the vote in the Capitol.
"It's a sign of enormous political change in America," he told NBC News. "And it's meaningful for people. It's real. It's not a symbolic gesture. I know a lot of married gay and lesbian people who have been worried ever since Clarence Thomas said what he said. So this is reassurance to them as well."
Passage of the legislation comes amid fears that the conservative Supreme Court majority might revisit the right to same-sex marriage after it rescinded the right to an abortion. It reflects the rapidly growing U.S. public support for legal same-sex marriage, which hit a new high of 71% in June, according to Gallup tracking polls - up from 27% in 1996.
"After the uncertainty caused by the Supreme Court's Dobbs decision, Congress has restored a measure of security to millions of marriages and families," Biden said in a statement. "They have also provided hope and dignity to millions of young people across this country who can grow up knowing that their government will recognize and respect the families they build."
The president also thanked members of both parties who championed the bill, saying, "We showed that it's possible for Democrats and Republicans to come together to safeguard our most fundamental rights."
In the Senate, 12 Republicans voted with unanimous Democrats to pass the bill, which sent it back to the House. The GOP proponents made up an eclectic group, including retiring Sens. Rob Portman of Ohio, Roy Blunt of Missouri and Richard Burr of North Carolina; centrist deal-makers like Sens. Mitt Romney of Utah, Susan Collins of Maine, Lisa Murkowski of Alaska and Thom Tillis of North Carolina; a leadership member in Sen. Joni Ernst of Iowa; and conservative Sens. Todd Young of Indiana, Shelley Moore Capito of West Virginia, Dan Sullivan of Alaska and Cynthia Lummis of Wyoming.
Frank, who attended a bill signing ceremony with Pelosi and Senate Minority Leader Chuck Schumer Thursday reflected in an interview on the bill's passage, 26 years after the Defense of Marriage Act banned federal recognition of same-sex marriage.
"I was here for the birth of DOMA. And this is one case when the funeral is a much happier occasion," he said.
This article was originally published on NBCNews.com