Washington — The “vote-a-rama” for President Biden’s $1.9 trillion coronavirus relief package, a grueling Senate process of voting on a series of amendments, resumed shortly before midnight on Friday after nearly 12 hours of stalemate within the Democratic caucus over an unemployment insurance benefit.

Senate Democrats reached a deal accepted by Senator Joe Manchin, the lone Democratic holdout, on Friday evening, after Manchin had an extended meeting with Senate Majority Leader Chuck Schumer. The compromise amendment extends additional unemployment insurance benefits through September 6 at $300 per week. It also makes the first $10,200 of unemployment insurance benefits non-taxable for households with incomes under $150,000, and extends tax rules regarding excess business loss limitations to 2026.

The amendment was approved by a vote of 50 to 49 shortly after 1 a.m. It is almost identical to an amendment proposed under a deal reached Friday morning by progressives and moderates, with the only change being the income limit for the non-taxable benefits.

Manchin, a moderate Democrat from West Virginia, has assumed a powerful role in the caucus because he’s one of the deciding votes in an evenly divided Senate. Democrats have 50 seats, which means that there is no room for dissent in the ranks: losing the support of a single senator means losing the overall vote. Earlier in the day, Manchin had appeared to lean towards supporting an amendment introduced by GOP Senator Rob Portman that would have cut the unemployment insurance benefit from $400 to $300 and extended it only through June.

The “vote-a-rama” resumed shortly before midnight with a vote on Portman’s amendment, which passed by a vote of 50-49, with Manchin’s support. However, that amendment will be superseded by the Democratic amendment, which Manchin also supported, and will be included in the final bill.

The “vote-a-rama” initially began on Friday morning with a failed vote on an amendment proposed by Senator Bernie Sanders that would have raised the federal minimum wage. But the vote stayed open even after all senators had voted, preventing the next amendment from being considered, as Democrats scrambled behind the scenes to convince Manchin to support their amendment.

Democratic Senator Ron Wyden, who had supported raising the benefit to $600 and extending it through October, told reporters Friday evening that “this is the best that can be done for people hurting right now.”

“This is the longest extension of benefits possible tonight,” Wyden said, also acknowledging that “this is not everything I would have written.”

After nearly 12 hours, the vote on Sanders’ amendment closed shortly before 11 p.m., the longest vote in modern Senate history. A motion to adjourn until Saturday morning proposed by Minority Leader Mitch McConnell narrowly failed, as Democrats seek to push through the “vote-a-rama” and a final vote in one evening.

“Now that this agreement has been reached, we are going to power through the rest of the process and get this bill done. Make no mistake, we are going to continue working until we get the job done,” Schumer said in a speech on the Senate floor after the vote on Sanders’ amendment closed. The dithering over the unemployment insurance amendment was a bad omen for Schumer, the newly minted majority leader, since the “vote-a-rama” is seen as a test of his ability to keep his caucus in line.

The Senate is expected to vote on dozens of amendments during the “vote-a-rama” Saturday morning. Amendments require support from a simple majority to be added to the bill, and most amendments proposed by Republicans are expected to fail. GOP Senator Dan Sullivan left the Senate due to a family emergency, meaning that most amendments will pass or fail with a 50-49 margin, so Vice President Kamala Harris will not be required to break any ties.

The Senate convened on Friday morning with two hours of debate, followed by a vote on Sanders’ amendment, which would have raised the untipped minimum wage to $15 per hour by 2025, and the tipped minimum wage to $14.75 over seven years. The Senate parliamentarian ruled last week that the Senate could not include a provision raising the minimum wage to $15 under budget reconciliation rules, so GOP Senator Lindsey Graham raised a point of order challenging the amendment.

Manchin, as well as Democratic Senators Jon Tester, Jeanne Shaheen, Kyrsten Sinema, Chris Coons, Tom Carper and Maggie Hassan, joined Republicans in voting against allowing the provision to be included. Senator Angus King, an independent who caucuses with Democrats, also voted against adding the minimum wage hike to the bill. Manchin and Sinema in particular had previously expressed their opposition to raising the minimum wage to $15.

Congress is using the budget reconciliation process to pass the bill, which limits time for debate and allows legislation to pass with a simple majority, a workaround that avoids the 60-vote threshold that most bills require to advance in the Senate. If every Democrat supports the final bill, it would pass without any Republican support.

But Republicans are critical of the size of the bill and frustrated that Democrats are using the reconciliation process, arguing that they are taking a partisan route rather than working across the aisle. Democrats reply that they don’t need to waste time negotiating with Republicans to reach the 60-vote threshold and pass a smaller package.

In retaliation, Republican senators aim to make the amendment process politically painful for Democrats. One such vote could be on an amendment to prevent undocumented immigrants from receiving stimulus checks. During the “vote-a-rama” last month on the budget resolution to set up the reconciliation process, eight Democrats joined all Republicans in voting for the amendment, infuriating progressives.

It’s unclear how long the “vote-a-rama” will go.

“At some point people are going to say, ‘I’m tired and I’m getting out of here,’ which is pretty powerful when you’re talking about a 50-50 Senate,” Republican Senator John Cornyn told reporters when asked what the timeline for the “vote-a-rama” would be.

The economic relief legislation is broadly popular, with recent polling showing that a majority of Americans support it, particularly the provision that provides $1,400 in direct checks to earners making under $75,000. Senate Democrats reached a deal to limit the eligibility for who receives direct checks earlier this week.

The House passed a version of the bill last week, but the final bill passed in the Senate will be slightly different. Some recently added measures, according to a Senate Democratic aide, include $510 million for FEMA and $750 million for states and communities impacted by job and revenue loss in the tourism, travel and outdoor recreation sectors. Another provision sets aside funding for education, including $1.25 billion for evidence-based summer enrichment, $1.25 billion for after school programs and $3 billion for education technology. It would also make COVID-19 student loan relief tax-free.

A vote on the motion to proceed to debate on the legislation succeeded in a party-line vote on Thursday afternoon, with Harris breaking the 50-50 tie. Although budget reconciliation rules allow for up to 20 hours of debate ahead of the “vote-a-rama,” Republicans and Democrats only used two, after GOP Senator Ron Johnson forced the Senate clerk to read the entire bill aloud on Thursday evening. The process took almost 11 hours, ending early Friday morning. The Senate agreed to convene later Friday morning for up to three hours of debate, but any time saved by limiting the debate time was quickly lost with the nearly 12-hour delay over the unemployment insurance amendment.

Jack Turman contributed reporting.