The US Congress ended a brief government shutdown by reaching a wide-ranging deal that is expected to push budget deficits into the $US1 trillion-a- year zone.
Federal funding for government services expired at midnight local time when the Senate missed a voting deadline.
The 650-page plan proposes an increase in spending on defence and domestic services of about $US300bn
The bill passed in the Senate and survived a rebellion of 67 conservative Republicans in the House of Representatives thanks to the support of some Democrats.
Those conservatives were mainly angry about non-military spending increases.
The bill had been expected to pass before the midnight deadline but lawmakers struggled with last-minute objections from Republican Senator Rand Paul, which meant they could not vote in time.
President Donald Trump signed the sweeping budget bill into law after it was approved by Congress, ending the government shutdown that lasted around five hours.
Mr Trump tweeted: "Our Military will now be stronger than ever before. We love and need our Military and gave them everything - and more. First time this has happened in a long time. Also means JOBS, JOBS, JOBS!"
Without more Republicans in Congress, we were forced to increase spending on things we do not like or want in order to finally, after many years of depletion, take care of our Military. Sadly, we needed some Dem votes for passage. Must elect more Republicans in 2018 Election!— Donald J. Trump (@realDonaldTrump) February 9, 2018
Mr Trump also wrote that the administration was forced to increase spending on "things we do not like or want" and negotiations will "start now!" on an immigration measure that he and Democrats have been battling over for months.
It was the second shutdown this year under the Republican-controlled Congress.
Politicians from both opposing parties criticised Senator Paul for slowing the bill up and provoking the shutdown.
Democratic Senator Claire McCaskill said "it looked like he was clueless", while Republican Senator John Thune called the shutdown "a colossal waste of time".
The deal is the fifth temporary government funding measure for the fiscal year that began on 1 October and replenishes federal coffers until 23 March, giving lawmakers more time to write a full-year budget.
It also extends the US government's borrowing authority until March 2019, sparing Washington politicians difficult votes on debt and deficits until after mid-term congressional elections in November.
Once known as the party of fiscal conservatives, the Republicans and Mr Trump are now quickly expanding the US budget deficit and its $US20 trillion national debt.
Their sweeping tax overhaul bill approved in December will add an estimated $US1.5 trillion to the national debt over 10 years.
Friday's deal allows for $US165 billion in additional defence spending over two years that will help Trump deliver on his promise to rebuild the military.
That won over many Republicans but some were still furious over the $131 billion extra made available for non-military spending, including health and infrastructure.
None of the added spending will be offset by budget savings elsewhere or revenue increases, relying instead on government borrowing.
There also is no offset reduction for nearly $US 90 billion in new disaster aid for US states and territories ravaged by hurricanes or wildfires.