The Senate passed legislation on Monday to fund federal government spending until Feb. 8, ending a rare government shutdown after just three days.

The Senate voted 81-18 to pass it and send it to the House, which is expected to pass it and get it to President Trump's desk by Monday night.

Senate approval followed days of brinksmanship between Democrats and Republicans, mostly over immigration. It ended when Democrats agreed to an offer by Senate Majority Leader Mitch McConnell, R-Ky.

He pledged that the Senate would consider a bill by Feb. 8 to legislate a new Deferred Action for Childhood Arrivals program for Dreamers, even if ongoing bipartisan talks between Democrats, Republicans, and the White House fail to yield a broader deal on the issue.

“Let me be clear, this immigration debate will have a level playing field at the outset, and an amendment process that is fair to all sides,” McConnell said Monday. “And it would be my strong preference for the Senate to consider a proposal that can be signed into law. A bipartisan, bicameral group is already negotiating, and I look forward to the completion of its work.”

Senate Minority Leader Chuck Schumer, D-N.Y., called the spending deal “a way forward,” and promised “to fight as strongly as we can for the Dreamers in the weeks ahead.”

Lawmakers want to strike a deal that would fund the rest of fiscal 2018, which ends Sept. 30 as well as provide new disaster relief for Puerto Rico, Texas, and other areas.

Democrats are also hoping to shore up Obamacare subsidies, all by the new Feb. 8 deadline.