Congress put the US government back in business Monday by voting to end a three-day shutdown, as President Donald Trump claimed victory in his standoff with Democrats in Washington.
The House voted 266 to 150 to extend federal funding, hours after Senate Democrats dropped their opposition to the plan after winning Republican assurances of a vote on immigration in the coming weeks.
Senate Minority Leader Chuck Schumer faced heavy pressure to end the filibuster of a government funding measure. (AP)
"I know there's great relief that this episode is coming to an end," House Speaker Paul Ryan told colleagues on the House floor. "But this is not a moment to pat ourselves on the back. Not even close."
The stalemate consumed Washington for the better part of a week, as lawmakers and the White House feuded over immigration policy and the nation's two main political parties exchanged bitter barbs before finally reaching a deal.
"I am pleased Democrats in Congress have come to their senses," Trump said in a defiant statement, as lawmakers moved to get hundreds of thousands of federal government employees back to work.
Trump was expected to sign the measure into law later Monday, with government operations essentially returning to normal on Tuesday.
Democrats decided to end the three-day shutdown after making progress with ruling Republicans toward securing the fate of hundreds of thousands of so-called "Dreamers" brought to America as children, many of them illegally.
With Democratic support, a bill keeping the government funded until February 8 easily passed the Senate, where different versions of the funding had languished for days.
Word of the compromise deal struck in Washington sent US stocks surging to new highs.
But the White House appeared in no mood for bipartisanship or magnanimity after a shutdown that overshadowed Trump's first anniversary in office.
Trump moved to undercut Democrats, saying he would only accept a comprehensive immigration reform -- one that notably addresses his demands for a border wall with Mexico as well as the fate of the "Dreamers."
"We will make a long-term deal on immigration if, and only if, it is good for our country," he said.
Top Senate Democrat Chuck Schumer earlier announced his party would vote with Republicans to end the shutdown, but in a sign of the poisoned politics of Washington he pilloried Trump in the process.
"The White House refused to engage in negotiations over the weekend. The great deal-making president sat on the sidelines," Schumer said.
Trump spent the weekend stewing at the White House when he had planned to be among friends and family at his home in Mar-a-Lago, Florida for his anniversary bash.
And with the fundamental row on immigration and funding of Trump's border wall unresolved, Republicans and Democrats may very well find themselves back in a similar stalemate come February 9.