The US House of Representatives has joined the Senate in approving a bill to end an overnight federal shutdown, sparing Republicans further embarrassment and averting serious interruption of the government's business.
The stopgap funding and budget measure, approved by a 240-186 House vote early on Friday morning, will go next to President Donald Trump.
The White House said in a statement that he will sign it into law, which would extend government funding through to March 23.
The shutdown, which started at midnight, was the second this year under the Republican-controlled Congress and Trump, who played little role in attempts by party leaders earlier this week to head it off and end months of fiscal squabbling.
A carefully crafted, bipartisan stopgap funding and budget package was introduced with confidence earlier this week by Senate leaders, who predicted swift passage before the expiration at midnight on Thursday of current funding authority.
But in an unexpected turn of events, the deadline was missed because Kentucky Republican Senator Rand Paul, objecting to deficit spending in the bill, engaged in a nine-hour, on-again, off-again protest and floor speech that leaders could not stop.
Paul's dissent dragged the Senate proceedings into the wee hours past the deadline, underscoring the persistent inability of Congress and Trump to deal efficiently with Washington's most basic fiscal obligation of keeping the government open.
After an all-night session of debating and voting, the bill ending the shutdown finally won House passage only after Democrats provided enough votes to offset the opposition of 67 Republicans, a remarkable rebellion in the party's ranks.
While Paul's performance in the Senate strained the patience of his colleagues, he focused on the same concern that caused so many House Republicans to oppose the bill - deficit spending.
The budget bill raises military and domestic spending by almost $US300 billion ($A420 billion) over the next two years. With no offsets in the form of other spending cuts or new tax revenues, that additional spending will be financed by borrowed money.
The deficit spending in the bill will add more red ink to Washington's balance sheet and further underscore a shift in Republican thinking that Paul was trying to draw attention to.
Once known as the party of fiscal conservatism, the Republicans and Trump are quickly expanding the nation's budget deficit and its $20 trillion national debt.
"I ran for office because I was very critical of President Obama's trillion-dollar deficits," Paul told fellow senators.
"Now we have Republicans hand in hand with Democrats offering us trillion-dollar deficits ... Really who is to blame? Both parties," he said.
Australian Associated Press