Then, Democrats voted overwhelmingly with Republicans to fund the government in its entirety for another three weeks.
"Now when I presented this to those in the Senate, and Senator (Dick) Durbin (D-Illinois), they were like, 'Oh, no we want guaranteed passage on a must-pass bill.' And it's like, well, nobody gets a guaranteed passage", he said.
Flake said negotiations would resume early on Monday leading up to the midday vote on the Senate floor.
Thousands of federal employees who had been placed on temporary, unpaid leave since Saturday breathed a sigh of relief.
"It was essentially a lunch break", Tom Chapel, a scientist at the Centers for Disease Control and Prevention in Atlanta, Georgia, told Reuters news agency.
Congress also needs to agree on a long-term funding plan, which is thought to be close at hand, but there are several reasons why finding a bipartisan solution on immigration is far from easy. Image of Capitol Hill from WAMU. "But this is not a moment to pat ourselves on the back". Schumer says the agreement with Senate Majority Leader Mitch McConnell means the Senate will begin a debate on immigration by February 8.
In the days leading up to the shutdown, Democratic lawmakers and strategists assumed Trump would take a "wall for Dreamers" deal, even pointing to Rep. Luis Guitierrez, D-Illinois, an immigration advocate, who has half-jokingly offered to help build Trump's wall.
"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 had said in a statement after it became clear Democrats had made a decision to let the legislation go through.
Claiming victory in his standoff with Democrats, Trump signed the measure into law and government operations would return to normal on Tuesday.
Schumer has said he and the President had agreed to a compromise on Friday just hours before the start of the shutdown that would have protected these immigrants from deportation in exchange for full funding for Trump's wall along the border with Mexico, and some other concessions.
Congress votes to reopen the U.S. government
Amazingly, Democrats made a decision to follow the same lame playbook last week as time ran out before the Friday night deadline. Yet Senate Majority Whip John Cornyn (R-Texas) couldn't resist taunting Democrats: "Sure, they got a commitment from Sen.
Media captionWhite House and Chuck Schumer trade barbs over shutdown Did Democrats "cave"?
Absent a breakthrough, the vote Monday will prove to be a test of unity and resolve among Democrats.
Democrats voiced scepticism of Mr McConnell's promise and some liberal groups are infuriated by the agreement to reopen the government.
Sixteen Democrats and two Republicans voted against the measure.
The Congressional Hispanic Caucus expressed fears on Tuesday that Republicans in the House of Representatives would pursue a harsh immigration bill written by Judiciary Committee Chairman Bob Goodlatte. Democrats went along with three extensions but balked at a fourth last week after immigration talks with Republicans and the White House broke down. "They blinked", principal deputy press secretary Raj Shah told CNN.
Why don't shutdowns happen elsewhere?
Democrats stalled on a longer-term spending bill until a bipartisan agreement was reached for DACA recipients.
In October, a budget for funding the government for the fiscal year was due. The prime minister resigned, elections were held, and a new government formed. Social Security and most other safety-net programs were unaffected by the lapse in federal spending authority. Some Republicans embrace Mr. Trump's nativist rhetoric and his calls to limit both legal and illegal immigration.
Taxes were collected, workers were paid, and a caretaker government passed a budget.
The government shut down on Friday when the chamber failed to cast the necessary 60 votes to pass a stop-gap bill to fund the government through February 16.
Really, the question isn't why other countries don't shutdown. We've been trained for years that any government shutdown imperils us all: The zombie apocalypse is coming.