Washington: US President Donald Trump has hailed the end of the government shutdown as a "big win" for Republicans and hit out at Democrats saying they "caved in" following the 69-hour crisis.
The Democratic leadership on Monday agreed to back the bill after accepting promises from Republicans for a debate later on the future of the 800,000 undocumented immigrants who were brought to the US as children, known as "Dreamers".
Under Trump's predecessor Barack Obama, these immigrants had been protected from deportation under a policy known as the Deferred Action for Childhood Arrivals (DACA).
"Big win for Republicans as Democrats cave on shutdown," Trump tweeted after the reopening of the federal government following a three-day shutdown.
But Senate Democratic leader Chuck Schumer said: "The great deal-making President sat on the sidelines."
In another tweet, Trump said: "Now I want a big win for everyone, including Republicans, Democrats and DACA, but especially for our great military and border security. Should be able to get there. See you at the negotiating table," Trump added.
The spending bill that ended the shutdown passed the Senate by a majority of 81-18 and the House of Representatives by 266-150, the US media reported.
Democrats voiced scepticism about the promises made by Republicans and some liberal groups were infuriated by the agreement to reopen the government.
Possible Democratic 2020 presidential candidates in the Senate -- Elizabeth Warren, Kirsten Gillibrand, Cory Booker, Bernie Sanders and Kamala Harris -- all voted against Monday's bill.
Senator Harris, the first Indian-American to serve in the US Senate, said: "You don't need me to tell you that Democrats just caved when it comes to ending the government shutdown. Even some of their leading senators are admitting it."
She tweeted that it would be "foolhardy" to trust Senate Majority Leader Mitch McConnell's promise to take up an immigration bill in the coming weeks.
Another California senator Dianne Feinstein told The Hill, a political news outlet, that she was "very disappointed" in the deal because there's no guarantee that Republicans would help the Dreamers.
Democratic congressman Luis Gutierrez slammed his own party's senators after the vote saying: "They caved. They blinked. That's what they do."
Thousands of federal employees who had been placed on temporary, unpaid leave since Saturday prepared to return to work.
The so-called continuing resolution keeps the government funded until February 8 in a hope that Congress can reach a longer-term budget agreement in the meantime.
"I know there's great relief that this episode is coming to an end," said Speaker Paul Ryan. "But this is not a moment to pat ourselves on the back. Not even close."