Updated

The U.S. Senate passed the Respect for Marriage Act on Tuesday in a bipartisan vote of 61 to 36, which will require the federal government to recognize all marriages, including same-sex marriages, that are legal in the state where they took place.

The measure will now move to the House, where it is expected to pass in the final days of a Democratic-controlled chamber before making its way to the White House for President Joe Biden's signature.

A handful of GOP senators, including Roy Blunt, Richard Burr, Shelley Moore Capito, Susan Collins, Joni Ernst, Cynthia Lummis, Lisa Murkowski, Rob Portman, Mitt Romney, Dan Sullivan, Thom Tillis and Todd Young, earlier this month helped the bill clear a first procedural hurdle. The same 12 Republicans propelled the legislation across the finish line Tuesday.

PELOSI, SCHUMER AGREE TO MOVE RAILROAD UNION BILL ‘ASAP’ AFTER WHITE HOUSE MEETING

FILE - In this June 28, 2015 file photo, crowd waves rainbow flags during the Heritage Pride March in New York. Tennis legend Billie Jean King will be one of the grand marshals of New York City's gay pride march as cities around the world hold LGBT pride events. New York's march will pass by the Stonewall National Monument in Greenwich Village on Sunday, June 24, 2018, before heading up Fifth Avenue. (AP Photo/Kathy Willens, File)

A handful of GOP senators voted for the bill. (Associated Press)

"By passing this bill, the Senate's sending a message to every American ... no matter who you are or who you love, you, too, deserve dignity and equal treatment under the law," Senate Majority Leader Chuck Schumer said from the floor Tuesday night.

Schumer went on to thank his colleagues, singling out "the teams of Senators Baldwin and Sinema, Collins, Tillis and Portman," who led the bipartisan negotiations. "None of this was inevitable," he added.

"At the urging of my colleagues, we took the calculated risk of holding off on a vote back in September because they believed with more time we could build enough bipartisan support to push this bill over the finish line."

"Today, we have vindication," he said.

An amendment by Collins, R-Maine, and Tammy Baldwin, D-Wis., was adopted Monday evening aimed at making sure the bill does not undermine religious liberty and that nonprofit religious organizations "shall not be required to provide services" to a marriage it opposes.

Sen. Mike Lee, R-Utah (Bill Clark/CQ-Roll Call Inc. via Getty Images)

On Tuesday the Senate also considered three additional amendments to the bill by Sens. Marco Rubio, R-Florida, Mike Lee, R-Utah, and James Lankford, R-Okla., that would have purportedly added stronger religious liberty protections to the measure, but all failed to reach a threshold vote for final adoption.

RICK SCOTT DEFENDS RELEASING 'RESCUE AMERICA' PLAN AHEAD OF MIDTERMS: 'I DON'T REGRET IT ONE BIT'

The bill is a result of months-long bipartisan negotiations. Congressional efforts to pass legislation protecting gay marriage rights followed a solo Supreme Court opinion by Justice Clarence Thomas in June in the case Dobbs v. Jackson Women's Health Organization. He said the court should "reconsider" its precedent on the issue. 

No other justices joined Thomas. But that opinion became a major campaign issue for Democrats and spurred lawmakers of both parties to craft legislation that would require states to recognize same-sex marriage even if that precedent eventually falls. 

Senate Majority Leader Chuck Schumer

Senate Majority Leader Chuck Schumer, D-N.Y. (AP Photo/J. Scott Applewhite)

Schumer said earlier this month that his original intent was to introduce the bill for a vote in September, but at the urging of colleagues on both sides of the aisle, he opted to hold off on scheduling a vote to give time for the "bipartisan process to play out."

"Much better to pass this legislation and move equality forward than simply have a show vote, which would bring political reckoning but no real change for the American people," he said.

Fox News' Tyler Olson contributed to this report.