The United States Congress narrowly avoided a Christmastime government shutdown early Saturday after intense last-minute negotiations.

Lawmakers approved a funding bill to keep federal agencies operational through mid-March, preventing a crisis that could have affected millions of workers.

With the midnight deadline just minutes past, senators bypassed normal procedures to expedite the package to a vote. This move halted preparations for a government shutdown, offering relief to more than 800,000 federal employees who faced the possibility of being furloughed without pay.

“It’s good news that the bipartisan approach in the end prevailed… It’s a good outcome for America and the American people,” said Senate Democratic Majority Leader Chuck Schumer on the Senate floor.

While Democrats hold a majority in the Senate, the funding package’s passage was made possible by bipartisan cooperation. The bill had earlier cleared the Republican-majority House, aided by support from Democrats.

However, there had been concerns that delays in the Senate could push the funding fight into the next week, potentially triggering a partial shutdown. Such a scenario would have left up to 875,000 workers furloughed, with another 1.4 million required to work without pay. Essential services like law enforcement would have continued operating, but many national parks, monuments, and other sites could have closed, disrupting holiday plans for millions.

This year’s budget negotiations were particularly contentious, driven in part by interventions from President-elect Donald Trump and tech billionaire Elon Musk, who was recently named Trump’s “efficiency czar.” In an eleventh-hour push, the duo pressured Republicans to renege on a funding deal previously agreed upon with Democrats.

Despite two failed compromise attempts, House Speaker Mike Johnson rallied lawmakers on Friday to secure a solution. The final package, passed early Saturday, funds the government through March 14 and includes $110 billion in disaster relief and aid for farmers. Notably, it excludes a two-year suspension of the country’s borrowing limit, a contentious provision demanded by Trump.

Elon Musk’s role in the negotiations drew sharp criticism from both Democrats and Republicans. His social media platform X became a battleground as he criticized the original funding agreement, often sharing inaccurate claims.

“Last time I checked, Elon Musk doesn’t have a vote in Congress,” said Republican Representative Rich McCormick of Georgia in an interview with CNN. “Now, he has influence, and he’ll put pressure on us to do whatever he thinks the right thing is for him. But I have 760,000 people that voted for me to do the right thing for them.”

Musk’s sway over the Republican Party and his apparent influence on Trump have raised concerns among Democrats about the power wielded by unelected individuals in shaping national policy.

Despite Trump’s insistence on including his priorities, Congress passed the funding bill without them, highlighting the limits of his influence even within the Republican Party. Trump had signaled his willingness to let the government shut down if his demands were unmet, but lawmakers ultimately chose to avoid such a crisis.

House Speaker Johnson remained optimistic, framing the passage as a prelude to greater Republican control. “President Trump will return to DC and to the White House, and we will have Republican control of the Senate and the House,” Johnson said. “Things are going to be very different around here.”

The funding package averts immediate financial disruption, giving Congress until mid-March to reach a more permanent resolution.