Thirty-nine House Republicans joined all Democrats in passing a bill on Thursday that enshrines protections for same-sex marriage on the federal level, sending the legislation to President Biden’s desk for final approval.

The measure, titled the Respect for Marriage Act, passed in a 258-169-1 vote. All Democrats supported the measure and one Republican — Rep. Burgess Owens (Utah) — voted present.

A total of 39 Republicans backed the bill: Reps. Kelly Armstrong (N.D.), Don Bacon (Neb.), Ken Calvert (Calif.), Kat Cammack (Fla.), Mike Carey (Ohio), Liz Cheney (Wyo.), John Curtis (Utah), Rodney Davis (Ill.), Tom Emmer (Minn.), Brian Fitzpatrick (Pa.), Mike Gallagher (Wis.), Andrew Garbarino (N.Y.), Mike Garcia (Calif.), Carlos Gimenez (Fla.), Tony Gonzales (Texas), Anthony Gonzalez (Ohio), Jaime Herrera Beutler (Wash.), Ashley Hinson (Iowa), Darrell Issa (Calif.), Chris Jacobs (N.Y.), Dave Joyce (Ohio), John Katko (N.Y.), Nancy Mace (S.C.), Nicole Malliotakis (N.Y.), Peter Meijer (Mich.), Mariannette Miller-Meeks (Iowa), Blake Moore (Utah), Dan Newhouse (Wash.), Jay Obernolte (Calif.), Tom Rice (S.C.), Mike Simpson (Idaho), Elise Stefanik (N.Y.), Bryan Steil (Wis.), Chris Stewart (Utah), Michael Turner (Ohio), Fred Upton (Mich.), David Valadao (Calif.), Ann Wagner (Mo.) and Mike Waltz (Fla.).

Thursday marked the second time the House passed the Respect for Marriage Act this year. The lower chamber approved the bill in a bipartisan fashion in July but had to take it up again this month after the Senate added an amendment outlining religious protections, which was central in securing enough GOP support to push it through the upper chamber.

The majority of the Republicans who voted “yes” on the bill Thursday also supported it in July.

“Today’s vote to protect marriage and protect religious liberties marks the end of a long fight for the basic civil right for any two people to marry without discrimination,” Mace said in a statement on Thursday. “The right to marry whoever you love regardless of the color of your skin or orientation shouldn’t be controversial.”

“Our nation was built on the notion of individual liberty. This vote marks another step forward in the American people’s constant fight for freedom,” she added.

Stewart called the bill “the best approach to protect all of our LGBTQ and religious friends and neighbors.”

“Civil rights are not a finite resource. We do not have to take from one group to give to another. That’s why I was proud to once again vote in favor of the Respect for Marriage Act,” he added on Twitter.

Eight fewer Republicans, however, supported the measure this time around compared to July, when 47 GOP lawmakers helped pass the legislation.

Seven Republicans — Reps. Brian Mast (Fla.), Dan Meuser (Pa.), Cliff Bentz (Ore.), Mario Diaz-Balart (Fla.), María Elvira Salazar (Fla.), Scott Perry (Pa.) and Jeff Van Drew (N.J.) — voted for the measure in July but opposed it on Thursday. Reps. Adam Kinzinger (R-Ill.) and Lee Zeldin (R-N.Y.) supported the measure over the summer but did not vote on Thursday, and Owens switched from “yes” to “present.”

Two other Republicans — Gallagher and Herrera Beutler — voted for the measure on Thursday after opposing it over the summer.

Gallagher pointed to the religious liberty amendment as reason why he supported the legislation this time around.

“The Respect for Marriage Act fixes the polygamy loophole in Speaker Pelosi’s hastily written version and creates strong religious liberty protections for religious organizations, including schools, churches, and adoption agencies. It also moves more of the issue of marriage to the states — where I believe it belongs — while providing practical reciprocity provisions for those who move from one state to another,” he told The Hill in a statement.

“It is far better for Congress to pass legislation that protects religious organizations and provides stability to the millions of people in a same-sex marriage than to rely on federal judges to make these decisions,” he added.

Meuser, who went from a “yes” vote to a “no” vote, said, “It is unfortunate that the Senate missed a critical opportunity to affirm the current law by passing the House version of the ‘Respect for Marriage Act.’”

“The Senate version, unlike the original House version, includes language that puts religious freedoms in jeopardy and opens up organizations to civil suits,” he added in a statement.

Owens, who flipped from “yes” to “present,” said his vote “signals a warning beacon that the war is far from won.”

“Religious freedom cannot prevail until and unless individuals and small business owners practicing their sincere religious beliefs have explicit protection under the law,” he wrote in a Twitter thread. “By protecting churches and religious organizations, we are only scratching the surface of the full scope of our First Amendment rights.”