WASHINGTON ― The Senate reached a deal Monday to fund the government and potentially provide a path forward for a larger immigration agreement. The House passed the deal later on Monday, and President Donald Trump signed the bill that same evening, effectively ending the shutdown.

Senators voted 81-18 for a three-week funding measure to reopen the government, with many Democrats saying they felt encouraged by Senate Majority Leader Mitch McConnell’s (R-Ky.) assurance over the weekend that the Senate would proceed to an immigration bill soon.

Democrats insisted they weren’t caving, even though they didn’t get what they wanted: an immediate vote on protections for undocumented young people often called Dreamers. But the deal gave them a way out of what could have been a politically damaging shutdown. The promise of a vote on the Deferred Action for Childhood Arrivals program, although it could be reneged on, is something Democrats didn’t have before. It’s the first time Democrats received a firm deadline for a vote on an immigration bill. And if McConnell doesn’t follow through, Democrats will be able to use this promise to vote against the next spending bill and pin the blame on Republicans.

If McConnell keeps his word, he’ll put Speaker Paul Ryan (R-Wis.) in a tough spot. There is a DACA bill currently working its way through the House that would deliver on a number of conservative immigration priorities, but it has no chance in the Senate.

If senators are able to pass their own bill, while simultaneously demonstrating that the House bill doesn’t have the votes to pass in their chamber, Ryan will be left with the choice of either putting the Senate bill up for a vote and angering conservatives or holding strong. If he holds strong and doesn’t put the Senate-passed measure up for a vote, he could risk another shutdown and strengthen the Democrats’ argument that another government closure is the fault of Republican obstructionism.

Story continues

“I don’t think I can guarantee a House outcome but I think the stronger the bill, in terms of the strength of the bipartisanship in the bill ― the odds go up in the House,” Sen. Tim Kaine (D-Va.) told HuffPost.

For now, Democrats were happy to end a government shutdown, fund the Children’s Health Insurance Program for six years, and functionally not give up any of their leverage.

Although CHIP had bipartisan support, Congress had failed to renew it. Part of the reason is that there were disagreements over how to pay for it, with some GOP proposals undercutting Obamacare in the process.

McConnell reiterated Monday morning that he would move to vote on an immigration bill if the two sides can’t agree to one by Feb. 8, as long as the government is still fully open.

“It would be my intention to take up legislation here in the Senate that would address DACA, border security, and related issues as well as disaster relief, defense funding, health care, and other important matters,” McConnell said. “It would be my strong preference for the Senate to consider a proposal that can actually be signed into law, a bipartisan, bicameral group is already negotiating, and I look forward to completion of its work.”

Some Democrats took McConnell’s remarks as a step toward their preferred solution. Sen. Bill Nelson (D-Fla.) said it represented “a path forward that is enormously smoother.”

“I believe Sen. McConnell will follow through,” independent Sen. Angus King of Maine, who caucuses with the Democrats, told reporters Monday. “I think he’s made his commitments so publicly and so unequivocally, particularly this morning ― which was a stronger statement than last night ― it’d be very difficult for him to try to find a way out of meeting that commitment.”

Sen. Kamala Harris (D-Calif.), however, was not convinced by McConnell’s assurances that he would hold a vote on an immigration bill in the future.

“I don’t believe he made any commitment whatsoever and I think it would be foolhardy to believe that he made a commitment,” Harris said.

The federal government has been shut down since early Saturday because the Senate didn’t approve a deal on the four-week spending bill needed to keep it open. Forty-four Democrats and four Republicans voted against that bill, with many saying they wouldn’t support anything that didn’t help the 700,000 undocumented young people Trump put at risk of losing deportation protections when he ended DACA. Other lawmakers who voted “no” said short-term spending bills are a bad way to operate the government.

Immigrant rights groups have been urging Democrats to demand Dreamer relief as part of must-pass spending bills since Trump rescinded DACA. Their logic ― based on years of experience ― is that a standalone bill to help Dreamers will languish if it’s not attached to another measure because Republican leaders won’t give it a vote, even if it has the support to pass.

McConnell’s promise convinced some Democrats to switch their vote. But he wasn’t able to make any guarantees about the House, as Ryan previously promised the conservative Freedom Caucus he would not hold immigration votes without support from a majority of the Republican conference.

Trump could also throw the entire deal into disarray. He rejected an offer from Senate Minority Leader Chuck Schumer (D-N.Y.) on Friday to fund a border wall ― something Democrats have said they would not accept ― in exchange for Dreamer protections, according to Schumer. Since the shutdown, White House officials have said they would not negotiate on immigration issues.

In a speech on the Senate floor announcing that his caucus would vote to move forward, Schumer said he hadn’t spoken with Trump since their Friday meeting at the White House ― before the government shut down. “The great deal-making president sat on the sidelines,” he said.

Dreamer activists called on Democrats earlier Monday to not settle for McConnell’s promise to hold a vote. If they lose DACA ― as an estimated 122 Dreamers already are each day ― they will lose work permits and could be deported.

“Promises won’t protect anyone from deportation because delay means deportations for us,” Greisa Martinez Rosas, advocacy director for the Dreamer-led group United We Dream, said on a call with reporters ahead of the vote.

The Democratic senators who voted against the measure were: Richard Blumenthal (Conn.), Cory Booker (N.J.), Catherine Cortez Masto (Nev.), Dianne Feinstein (Calif.), Kirsten Gillibrand (N.Y.), Kamala Harris (Calif.), Mazie Hirono (Hawaii), Patrick Leahy (Vt.), Ed Markey (Mass.), Robert Menendez (N.J.), Jeff Merkley (Ore.), Chris Murphy (Conn.), Bernie Sanders (Vt.), Jon Tester (Mont.), Elizabeth Warren (Mass.) and Ron Wyden (Ore.).

On the Republican side, Sens. Mike Lee (Utah) and Rand Paul (Ky.) also voted against it.

Amanda Terkel contributed reporting.

This story has been updated with vote counts, additional quotes and news of Donald Trump’s signature.

Also on HuffPost

April 2015

At an event hosted by Texas Patriots PAC: “Everything’s coming across the border: the illegals, the cars, the whole thing. It’s like a big mess. Blah. It’s like vomit.”

June 2015

At a speech announcing his campaign: "When Mexico sends its people, they’re not sending their best. They’re not sending you. They’re not sending you. They’re sending people that have lots of problems, and they’re bringing those problems with us. They’re bringing drugs. They’re bringing crime. They’re rapists. And some, I assume, are good people."

August 2015

On NBC's "Meet the Press": “We’re going to keep the families together, we have to keep the families together, but they have to go."

September 2015

On CBS's "60 Minutes": “We’re rounding ‘em up in a very humane way, in a very nice way. And they’re going to be happy because they want to be legalized. And, by the way, I know it doesn’t sound nice. But not everything is nice.”

November 2015

On MSNBC's "Morning Joe": “You are going to have a deportation force, and you are going to do it humanely."

February 2016

At a GOP primary debate: “We have at least 11 million people in this country that came in illegally. They will go out. They will come back ― some will come back, the best, through a process.”

March 2016

At a press conference when asked if he would consider allowing undocumented immigrants to stay: "We either have a country or we don’t. We either have a country or we don’t. We have borders or we don’t have borders. And at this moment, the answer is absolutely not.”

April 2016

At an event hosted by NBC's "Today Show": “They’re going to go, and we’re going to create a path where we can get them into this country legally, OK? But it has to be done legally. ... They’re going to go, and then come back and come back legally.”

July 2016

At the Republican National Convention: "Tonight, I want every American whose demands for immigration security have been denied ― and every politician who has denied them ― to listen very closely to the words I am about to say. On January 21st of 2017, the day after I take the oath of office, Americans will finally wake up in a country where the laws of the United States are enforced."

September 2016

At a rally: “Anyone who has entered the United States illegally is subject to deportation. That is what it means to have laws and to have a country. Otherwise we don’t have a country.”

September 2016

On "The Dr. Oz Show": “Well, under my plan the undocumented or, as you would say, illegal immigrant wouldn’t be in the country. They only come in the country legally.”

Love HuffPost? Become a founding member of HuffPost Plus today.

This article originally appeared on HuffPost.