(CNN) -- The Senate passed President Joe Biden's $1.9 trillion Covid relief plan on Saturday, after an all-night "vote-a-rama" and a 12-hour struggle to get one Democrat to support the party's plan on a critical issue.
The vote was 50 to 49 on a party-line vote. The legislation is now expected to go back to the House for a final vote before Biden signs it into law.
Democrats have faced fierce pressure to stay united to pass the administration's top legislative priority before March 14, when jobless benefits are set to expire for millions of Americans. But West Virginia Sen. Joe Manchin's unexpected opposition on Friday to a Democratic deal boosting unemployment benefits ground the Senate to a halt, prompting a furious lobbying effort between the two parties.
Democrats kept a Senate roll call vote open for 11 hours and 50 minutes, the longest in recent history, as Manchin signaled he would accept the Republicans' less generous proposal.
The dispute was a sign of the centrist Democrat's power in the 50-50 Senate, where Democrats control the narrowest possible majority, and an example of how a single senator can derail the President's agenda.
But after a long negotiation, and with a flurry of other amendments to consider, Manchin finally agreed to extend $300 weekly unemployment benefits through September 6, about a month earlier than what Democrats had envisioned. The West Virginia Democrat also limited a provision to make the first $10,200 in benefits nontaxable apply only to households making less than $150,000.
"We have reached a compromise that enables the economy to rebound quickly while also protecting those receiving unemployment benefits from being hit with unexpected tax bills next year," said Manchin in a statement.
White House press secretary Jen Psaki said Friday evening that Biden "supports the compromise agreement, and is grateful to all the Senators who worked so hard to reach this outcome."
The nearly $2 trillion package includes up to $1,400 stimulus checks to many Americans, and billions of dollars for states and municipalities, schools, small businesses and vaccine distribution.
It also extends a 15% increase in food stamp benefits from June to September, helps low-income households cover rent, makes federal premium subsidies for Affordable Care Act policies more generous and gives $8.5 billion for struggling rural hospitals and health care providers.
The Senate passed the bill after a vote-a-rama, a Senate tradition that the minority party uses to put members of the majority on the record on controversial issues in an effort to make changes to a bill that they oppose.
Senate Republicans introduced a number of amendments overnight that were narrowly defeated by the Democratic majority. Sen. Susan Collins of Maine pushed to replace Biden's bill with a $650 billion version. Sen. Marco Rubio of Florida wanted to tie school funding to reopening requirements. Sen. Tim Scott of South Carolina advocated for greater transparency for state nursing home investigations following the scandal in New York. And Sen. Mitt Romney of Utah proposed cutting billions of dollars from the bill to states that had better-than-expected revenues despite the pandemic, noting that California actually ran a big surplus last year.
But the vast majority of the GOP amendments failed, along with one by Montana Democratic Sen. Jon Tester to require Biden to approve the Keystone XL pipeline, which the President blocked in January by executive order.
Only a few amendments were adopted, including Oregon Sen. Ron Wyden's compromise with Manchin on unemployment benefits, New Hampshire Sen. Maggie Hassan's measure incentivizing schools to reopen in-person learning and Kansas Sen. Jerry Moran's effort to strike a bipartisan deal protecting veterans' educational benefits for legitimate institutions.
The first, extraordinarily long amendment vote -- on a measure to raise the minimum wage to $15 a hour, introduced by Vermont Sen. Bernie Sanders -- was an early test of Democratic party unity.
Eight senators in the Democratic conference -- Manchin, Tester, Hassan, Kyrsten Sinema of Arizona, Angus King of Maine, Jeanne Shaheen of New Hampshire and Chris Coons and Tom Carper of Delaware -- opposed the minimum wage amendment, along with every Republican senator.
Democrats then rejected a Republican motion to adjourn late Friday, banking that Republicans will grow weary and won't offer as many amendments.
Early Saturday, the Senate adopted Ohio Republican Sen. Rob Portman's plan to extend weekly jobless benefits at $300 through July 18. Manchin also voted for the GOP proposal, but the Democrats' alternative plan, which was adopted early Saturday morning, will superseded the Portman amendment.
The Senate's effort to pass the $1.9 trillion legislation kicked into high gear Thursday when Democratic senators and Vice President Kamala Harris voted to open debate. Republicans then forced the 628-page bill to be read aloud.
Senate Majority Leader Chuck Schumer, a New York Democrat, criticized Republican tactics to slow down the process and on Friday thanked the Senate floor staff for the nearly 11 hours of reading the bill, calling them "the unsung heroes of this place."
The Democratic-controlled House passed the legislation at the end of last month, along with an increase in the minimum wage to $15 a hour. But the Senate parliamentarian ruled that the wage hike could not be included in the Senate's version of the bill under reconciliation. That change and others, including the alterations to jobless benefits, will force the House to vote again on the legislation, which is expected to happen next week.