It was another heart-in-mouth moment for Barack Obama last night, as the US House of Representatives narrowly averted the second government shutdown in just over a year within two-and-a-half hours of its deadline.
After a day of to-ing and fro-ing, as well as pressure on rebellious Democrats, the House finally passed a $1 trillion (£636.2bn) spending package, nicknamed the "Cromnibus" because it combines an omnibus spending bill with a continuing resolution (CR). The bill will keep most sections of the government running until September.
Only the Department of Homeland Security, which oversees US immigration, is funded for a shorter time, after a struggle between Obama and Republicans over new immigration rules.
Among the measures which members of Obama's own party took issue to were the scaling-back of the Dodd-Frank rules, meaning banks will continue to be allowed to trade certain derivatives branded as "risky" after the 2008 financial crisis, plus a last-minute addition increase in the amount individuals can donate to political parties.
Senator Elizabeth Warren led the Democrat rebellion, calling the spending bill "the worst of government for the rich and powerful". At one point, house minority leader Nancy Pelosi said she was "enormously disappointed" by the bill, adding she felt "blackmailed".
Last year the US Federal government shut down for two weeks as the Senate struggled to agree a deal to raise the US' debt ceiling.