The US Congress has moved to end a brief government shutdown on Friday, which happened when the Senate missed a deadline to approve a budget bill and temporary funding measures.
The House of Representatives joined the Senate in the early hours in voting for the package, by 240 votes to 186.
The measures will now go to Donald Trump. The White House said in a statement that the president would sign them into law.
The shutdown, which started at midnight, was the second this year under the Republican-controlled Congress.
The bill won House approval only after Democrats provided enough votes to offset the opposition of 67 Republicans.
There had been hopes a new spending bill would be approved by the Republican-controlled Congress before federal funding expired. However a fiscal conservative in the Senate, Rand Paul, made an on-off floor speech over several hours to block it. He objects to 300 billion dollars in deficit spending in the bill.
The outspoken Senator was complaining that his fellow Republicans had turned away from the fiscal discipline they showed a few years ago.
"When the Democrats are in power, Republicans appear to be the conservative party. But when Republicans are in power, it seems there is no conservative party. The hypocrisy hangs in the air and chokes anyone with a sense of decency or intellectual honesty," the Kentucky senator said during his speech.
He said the overall bill that includes a stopgap measure would "loot the Treasury". Some estimates put the proposed increase in spending - which includes 165 billion dollars in extra defence funds - at even higher than the 300 billion dollar quoted figure.
Other Republicans were said to oppose a bi-partisan deal designed to put an end to squabbling over fiscal policy, at least until beyond November's midterm congressional elections.
Donald Trump has been criticised for fiscal irresponsibility and failing to deal effectively with Washington's obligations, although the US president played little role in the Senate-crafted bill.