President Trump praised congressional Democrats on Monday for accepting a deal that will reopen the government in exchange for the promise of future negotiations over immigration.

"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," Trump said in a statement read by White House press secretary Sarah Sanders on Monday. "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 the country."

Many of the Senate Democrats who withheld their votes from a short-term spending bill on Friday voted for the measure Monday after Senate Majority Leader Mitch McConnell promised to allow a vote within the next three weeks over legislation that extends protections for young, undocumented immigrants. While Senate Minority Leader Chuck Schumer framed the decision to reopen the government as a victory for Democrats, Republicans said Schumer accepted a deal that was not substantively different than what McConnell and the White House had suggested before the partial shutdown began on Friday.

Trump spent much of the weekend hammering Senate Democrats via Twitter over their decision to vote down the continuing resolution last week because it did not include immigration provisions.