Washington • Senate Democrats bowed to pressure to reopen the government Monday, joining Republicans in backing an immigration and spending compromise that was quickly denounced by liberals and immigration activists.

Roughly 60 hours after the federal government first shut down, a bipartisan group of negotiators in the Senate prevailed with leadership, trading Democratic support for reopening the government for a commitment by Republicans to hold a vote resolving the status of young undocumented immigrants by mid-February.

The Senate voted 81-18 to end a filibuster of a spending bill that would fund the government through Feb. 8 and reauthorize the Children’s Health Insurance Program for six years. The upper chamber was expected to pass the measure Monday afternoon, then send it to the House for quick approval.

The government can reopen once President Donald Trump signs the funding into law.

The resolution of the three-day shutdown exposed a growing rift between two groups of Democratic senators: those facing tough reelection campaigns in states Trump won, and those courting progressive voters ahead of possible 2020 presidential bids.

Channeling rage from immigration activists, the possible 2020 candidates were highly critical of their leaders’ willingness to trust that Senate Majority Leader Mitch McConnell, R-Ky., will allow an immigration vote after Feb. 8 if senators cannot strike a deal before then.

“I believe it’s been a false choice that’s been presented” between keeping the government open and resolving the DACA issue, said Sen. Kamala D. Harris, D-Calif., who voted no. “I believe we can do both.”

A majority of Democrats had forced the shutdown with demands for a vote on legislation to protect Deferred Action for Childhood Arrivals recipients from deportation after Trump canceled the program. The final agreement did not include these protections, nor any specific guarantee of a vote.

Other possible White House contenders who voted against the bill included Sens. Bernie Sanders, I-Vt., Kirsten Gillibrand, D-N.Y., and Elizabeth Warren, D-Mass.

Democratic and independent senators who relented in the standoff said they did not necessarily trust McConnell, but had faith that the bipartisan negotiators, including Sens. Susan Collins, R-Maine, and Joe Manchin III, D-W.Va., would force him to abide by his commitments.

“I think frankly our trust is more with our colleagues, that they will hold him accountable,” said Sen. Claire McCaskill, D-Mo., who is up for reelection this year in a state Trump won.

“If there’s any silver lining to this dark cloud, it is this is the first time I’ve seen such a large group in the middle come together,” she said.

McConnell had said Sunday night and Monday morning that it was his “intention” to take up legislation addressing DACA, border security and other issues if Democrats agreed to fund the government until Feb. 8.

“This immigration debate will have a level playing field at the outset and an amendment process that is fair to all sides,” he said Monday.

The vote to end debate on the spending bill came together quickly after Collins and several other senators said they wanted a firmer, more detailed commitment from McConnell.

“It would be helpful if the language were a little bit stronger because the level of tension is so high,” Collins told reporters outside her office.

A Republican aide involved in the talks said that McConnell and his team were considering putting their plan in document form with more detail as a way of convincing some Democrats to support the short-term bill.

Ahead of the vote to end debate, Senate Minority Leader Charles E. Schumer, D-N.Y., warned McConnell to keep his word.

“I expect the majority leader to fulfill his commitment to the Senate, to me and to the bipartisan group, and abide by this agreement. If he does not . . . he will have breached the trust of not only the Democratic senators, but members of his own party as well,” Schumer said.

As the impasse continued through the weekend, it was unclear whether the public would blame the Democrats or the Republicans, who control the White House and Congress.

With the negotiations focused on the Senate, Trump used Twitter to interject his opinion. Democrats are acting at the behest of their “far left base” in advocating for “dreamers,” he argued Monday morning.

“The Democrats are turning down services and security for citizens in favor of services and security for noncitizens. Not good!” Trump wrote on Twitter.

The effects of the shutdown over the weekend were relatively limited: halting trash pickup on National Park Service property, canceling military reservists’ drill plans, switching off some government employees’ cellphones.