Democrats agreed to vote along with the Republicans to end the three-day stalemate after they secured assurance from Republican leaders to address the fate of young, undocumented immigrants known as Dreamers.
However, shortly after the vote to end the shutdown, Trump lashed out at Democrats, saying “they have come to their senses”.
The Democratic Leader, Sen. Chuck Schumer, said after the compromise with the Republicans that “in a few hours, the government will reopen. We have a lot to do”.
Speaking on the Senate floor, Schumer announced that he and Sen. Mitch McConnell, the Republican Leader, had “come to an arrangement” to adopt the three-week spending measure while continuing to negotiate a “global agreement”.
According to him, that agreement will include the fate of the Dreamers – undocumented immigrants brought to the country by their parents as children.
Monday’s vote came after a frantic weekend of work by a bipartisan group of more than 20 senators, who on Sunday night discussed a plan in which the government would stay open through early February.
This was in addition to a promise from McConnell to allow a vote on a measure to protect the Dreamers from deportation.
McConnell pledged on Monday morning that he would permit a “free and open debate” on immigration next month if the issue had not been resolved by then.
However, his promise was not enough for many Democrats, and on Monday morning, moderate Senate Democrats were still pressing for more in exchange for their votes to end the shutdown.
By noon, just before the first vote to end debate on the spending bill, the moderate Democrats were predicting passage.
“We’re going to vote to reopen the government,” Sen. Mark Warner of Virginia, a Democrat whose state is home to thousands of Federal workers, said.
Warner said there was now a “path clear on how we’re going to get a full-year budget and we got a path clear on how we’re going to start an immigration debate”.
Responding to the development, Trump said: “I am pleased that Democrats in Congress have come to their senses and are now willing to fund our great military, border patrol, first responders, and insurance for vulnerable children.
“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”, in a statement released by the White House.
However, the House of Representatives would still vote on the bill later on Monday evening but final passage would be just a formality.
The bill also funds the popular Children’s Health Insurance Programme for six years and delays or suspends a handful of tax increases that were to help pay for insurance coverage under the Affordable Care Act.