"I am pleased Democrats in Congress have come to their senses" Trump said in a defiant statement, as Senate lawmakers moved to get hundreds of thousands of federal government employees back to work.
Democrats said they 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 illegally as children.
With Democratic support, a compromise bill keeping the government funded until February 8 passed a key Senate hurdle and was headed for final passage in the chamber, with the shutdown to formally end once the House of Representatives approves the measure.
But the White House appeared in no mood for bipartisanship or magnanimity: The shutdown already spoiled a party to mark Trump's first anniversary in office Saturday and was threatening a trip to Davos, Switzerland -- now officially back on the cards.
Trump quickly 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."
"As I have always said, once the government is funded, my administration will work toward solving the problem of very unfair illegal immigration. We will make a long-term deal on immigration if, and only if, it is good for our country."
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.
"Since our meeting in the Oval Office on Friday, the President and I have not spoken, and 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.
Notably, many of the Democrats who voted against the agreement included a litany of potential 2020 presidential candidates including Kamala Harris, Bernie Sanders, Kirsten Gillibrand, and Elizabeth Warren.
"We will have another vote in three weeks," said Molly Reynolds, Fellow in Governance Studies at Brookings Institute. If no progress is made on an immigration bill then "I think Democrats still have the ability to potentially force another shutdown over the issue."
There are an estimated 700,000 "Dreamers" whose fates are up in the air.
"If he does not, of course, and I expect he will, he will have breached the trust of not only the Democratic senators but members of his own party as well," Schumer said.
Trump has staked his political fortunes on taking a hard line on immigrants, painting them as criminals and scroungers.
Dealmaker on sidelines
As Monday began, Trump goaded Democrats from the sidelines, accusing them of shutting down the government to win concessions on immigration, in service of "their far left base."
"They don't want to do it but are powerless," he tweeted, referring to Schumer and other Democratic leaders.
Over the weekend, Trump encouraged the Senate's Republican leaders to invoke the "nuclear option" -- a procedural maneuver to change the chamber's rules to allow passage of a budget by a simple majority of 51 votes to end the shutdown.
The bill needed 60 votes to pass the procedural hurdle in the 100-member Senate, meaning Republicans -- who have a one-seat majority -- could not maneuver on their own.
There have been four government shutdowns since 1990. In the last one, more than 800,000 government workers were put on temporary leave.
Essential federal services and the military were operational Monday, but even active-duty troops will not be paid until a deal is formally sealed.
(This story has not been edited by NDTV staff and is auto-generated from a syndicated feed.)
Subscribe to our YouTube channel, like us on Facebook or follow us on Twitter and Instagram for latest news and live news updates.