The U.S. government narrowly avoided a catastrophic shutdown after politicians agreed to a last-minute spending deal.
Without a deal, federal workers would not have been paid ahead of the Christmas season, impacting a wide range of public services.
Plans to approve the government’s budget were thrown into turmoil this week after billionaire Elon Musk sharply criticized bills introduced by Republicans and Democrats.
His opposition was supported by President-elect Donald Trump, who wanted to raise the debt ceiling, the limit on how much the government can borrow.
But his amendment to suspend the cap for two years failed in a vote on Thursday, leaving parliament in a race against the clock to reach a deal by midnight local time.
House Speaker Mike Johnson’s restructuring plan postpones Trump’s request to raise the debt ceiling until the new year.
Mr. Johnson had insisted that Congress would “do its duty” and avoid a federal shutdown.
“This is a good outcome for the country,” Johnson said, adding that he had spoken to Trump and that “Trump is certainly happy with the outcome.”
Late Friday, the new plan passed the Republican-controlled House by a vote of 336-34 with bipartisan support.
Hours later, 38 minutes after the midnight US time (5am UK time) deadline, the Democratic-controlled Senate passed the bill by an 85-11 vote.
Despite the deadline passing, the government did not trigger closure procedures.
Musk wrote to X that he was satisfied with the packaging. “We went from having bills that weighed pounds to bills that weighed ounces,” he posted.
The final version removed some provisions pushed by Democrats, saying Republicans were bowing to pressure from unelected billionaire Musk.
The bill will now be sent to the White House, where President Joe Biden is expected to sign it into law late Saturday.
Read more from Sky News:
Dr. King’s cancer treatment will continue into 2025
‘Prince of Darkness’ appointed as new US ambassador
What is a government shutdown?
If the Senate does not approve the spending bill or extends the deadline, it could lead to a government shutdown and impact federal employees and the public services they provide.
Essential government agencies such as the FBI, Border Patrol, and Coast Guard will remain open.
But while national parks and monuments will be closed and troops will remain stationed, many civilian employees at agencies such as the Pentagon will be sent home.
In some cases, federal employees may be furloughed. That means they’re still working, but temporarily out of work until the government reopens.
Courts are also affected, with civil proceedings suspended but criminal prosecutions continuing. And the Internal Revenue Service would stop auditing tax returns.
The previous government shutdowns, the longest in history, occurred in December 2018 and January 2019 during Trump’s first term in the White House.