The Senate voted Monday to reopen the government, ending a three-day standoff that left federal agencies shuttered and hundreds of thousands of workers furloughed.

Democrats agreed to advance a stopgap spending measure lasting until Feb. 8 after Senate Majority Leader Mitch McConnell Addison (Mitch) Mitchell McConnellMomentum growing among Republicans for Supreme Court vote before Election Day Trump expects to nominate woman to replace Ginsburg next week Video of Lindsey Graham arguing against nominating a Supreme Court justice in an election year goes viral MORE (R-Ky.) promised to allow an immigration bill to reach the floor next month. The vote was 81-18.

"After several discussions, offers and counteroffers, the Republican leader and I have come to an arrangement. We will vote today to reopen the government to continue negotiating a global agreement," Senate Minority Leader Charles Schumer Chuck SchumerVideo of Lindsey Graham arguing against nominating a Supreme Court justice in an election year goes viral Graham signals support for confirming a Supreme Court nominee this year Pelosi orders Capitol flags at half-staff to honor Ginsburg MORE (D-N.Y.) said ahead of the vote.

ADVERTISEMENT

The three-week funding bill still needs to pass on a final up-or-down vote, but that is a formality now that the Senate has voted to end dilatory debate. The House is expected to approve the bill quickly.

The deal falls short of the Democrats’ initial demand that President Trump Donald John TrumpUS reimposes UN sanctions on Iran amid increasing tensions Jeff Flake: Republicans 'should hold the same position' on SCOTUS vacancy as 2016 Trump supporters chant 'Fill that seat' at North Carolina rally MORE and GOP leaders agree to the rough outlines of a deal to replace the Deferred Action for Childhood Arrivals (DACA) program and protect hundreds of thousands of "Dreamers" facing deportation.

Trump and GOP leaders refused to negotiate on immigration while the government remained closed.

Schumer said McConnell has committed that if negotiators fail to reach an immigration deal before the stopgap spending measure expires on Feb. 8, “the Senate will immediately proceed to consideration of legislation” to protect Dreamers.

He said McConnell has promised that immigration debate “will be neutral and fair to all sides.”

“Now there is a real pathway to get a bill on the floor and through the Senate. It is a good solution and I will vote for it,” Schumer said.

ADVERTISEMENT

The funding measure also includes a six-year funding extension for the Children’s Health Insurance Program, a critical priority for members of both parties. As many as 20 states would have run out of CHIP money — affecting millions of children — if Congress did not reach a deal by Feb. 1.

The agreement isn't sitting well with everyone in the Democratic Party.

Liberal groups quickly accused Democrats of caving, saying they failed to get a real guarantee that Dreamers will be protected.

“It’s official: Chuck Schumer Chuck SchumerVideo of Lindsey Graham arguing against nominating a Supreme Court justice in an election year goes viral Graham signals support for confirming a Supreme Court nominee this year Pelosi orders Capitol flags at half-staff to honor Ginsburg MORE is the worst negotiator in Washington — even worse than Trump,” Credo Political Director Murshed Zaheed said in a statement. “Any plan to protect Dreamers that relies on the word of serial liars like Mitch McConnell, Paul Ryan Paul Davis RyanKenosha will be a good bellwether in 2020 At indoor rally, Pence says election runs through Wisconsin Juan Williams: Breaking down the debates MORE or Donald Trump is doomed to fail.”

Notably, several senators seen as potential White House candidates for the Democratic Party in 2020 voted against the funding bill, including Sens. Cory Booker Cory Anthony BookerBipartisan praise pours in after Ginsburg's death DHS opens probe into allegations at Georgia ICE facility Democratic lawmakers call for an investigation into allegations of medical neglect at Georgia ICE facility MORE (N.J.), Bernie Sanders Bernie SandersNYT editorial board remembers Ginsburg: She 'will forever have two legacies' Two GOP governors urge Republicans to hold off on Supreme Court nominee Sanders knocks McConnell: He's going against Ginsburg's 'dying wishes' MORE (I-Vt.), Elizabeth Warren Elizabeth WarrenBiden's fiscal program: What is the likely market impact? Warren, Schumer introduce plan for next president to cancel ,000 in student debt The Hill's 12:30 Report - Presented by Facebook - Don't expect a government check anytime soon MORE (D-Mass.), Kirsten Gillibrand Kirsten GillibrandSunday shows preview: Justice Ginsburg dies, sparking partisan battle over vacancy before election Suburban moms are going to decide the 2020 election Jon Stewart urges Congress to help veterans exposed to burn pits MORE (N.Y.) and Kamala Harris Kamala HarrisHarris honors Ginsburg, visits Supreme Court The Hill's Campaign Report: Trump and Biden vie for Minnesota | Early voting begins in four states | Blue state GOP governors back Susan Collins Kamala Harris: Black Americans have been 'disproportionately harmed' by Trump MORE (Calif.).

The three-week bill set to advance is identical to the four-week spending measure the House sent to the Senate last week, except the funding will expire on Feb. 8 instead of Feb. 16.

Democrats blocked the monthlong House bill on Friday evening with a filibuster. Only five Democrats voted with Republicans to avoid the shutdown, while four Republicans joined Democrats in objecting.

In the end, however, Democrats worried they lacked an endgame for ending the shutdown and were suffering political damage as Republicans hammered them for holding government funding hostage.

A nationwide CNN poll conducted by SSR showed the Democrats’ lead on the generic ballot has shrunk to only a 5-point advantage. The poll was conducted last week before the shutdown began on Friday.

Democrats predicted the funding bill would pass after they held a caucus meeting immediately off the Senate floor before the vote.

They can claim a small measure of victory from McConnell’s promise to bring an immigration bill to the floor next month and allow an open amendment process.

But there’s no assurance that the House will take up the immigration legislation, something that caused consternation in the Democratic caucus right up until the vote.

ADVERTISEMENT

Sen. Tom Cotton Tom Bryant CottonRenewed focus on Trump's Supreme Court list after Ginsburg's death Republicans call for DOJ to prosecute Netflix executives for releasing 'Cuties' Loeffler calls for hearing in wake of Netflix's 'Cuties' MORE (R-Ark.), a central figure in the talks who has urged tougher enforcement against illegal immigration, said McConnell had always been willing to debate the issue on the floor.

“Sen. McConnell has been perfectly clear since September [that] he will bring an immigration bill to the floor at the right time. …. He has not changed since Friday,” he said.

Earlier Monday, Democrats said they could not feel assured that McConnell would hold up his bargain after he promised moderate Republican Sen. Susan Collins Susan Margaret CollinsJeff Flake: Republicans 'should hold the same position' on SCOTUS vacancy as 2016 Trump supporters chant 'Fill that seat' at North Carolina rally Momentum growing among Republicans for Supreme Court vote before Election Day MORE (Maine) during the tax-reform debate to pass legislation shoring up the individual insurance market before the end of the year. That bill is still in limbo.

McConnell also promised Sen. Jeff Flake Jeffrey (Jeff) Lane FlakeJeff Flake: Republicans 'should hold the same position' on SCOTUS vacancy as 2016 Republican former Michigan governor says he's voting for Biden Maybe they just don't like cowboys: The president is successful, some just don't like his style MORE (R-Ariz.) — according to Flake’s version of events — that he would bring DACA legislation to the floor in January, something that has yet to happen and doesn’t appear likely at this point.

Sen. Christopher Coons Christopher (Chris) Andrew CoonsBiden promises Democratic senators help in battleground states Shakespeare Theatre Company goes virtual for 'Will on the Hill...or Won't They?' The Hill's Morning Report - Sponsored by The Air Line Pilots Association - Pence lauds Harris as 'experienced debater'; Trump, Biden diverge over debate prep MORE (Del.), a Democratic moderate who voted for a government spending bill in the absence of an immigration deal in December but then voted to block a monthlong stopgap on Friday, said Democrats wrestled with the question of whether they could trust McConnell.

“One of the challenges we have as a body, several members who are part of this negotiating group … famously had promises from Leader McConnell that certain things would happen” and they didn’t happen, Coons told CNN’s “New Day” early Monday.

ADVERTISEMENT

Collins told reporters before the vote that Democrats wanted stronger assurances.

"I do think it would be helpful if the language were a little bit stronger," she said.



But GOP leaders felt they had the upper hand politically and refused to go any further.

“I think that’s all they’re going to get,” Senate Republican Whip John Cornyn John CornynCalls grow for Biden to expand election map in final sprint Bipartisan praise pours in after Ginsburg's death Chamber of Commerce endorses McSally for reelection MORE (R-Texas) said before the vote.

Jordain Carney contributed.