A three-day shutdown of the federal government came to an end on Monday, as lawmakers in Washington reached a compromise that funded the government through 8 February and reauthorized a popular children’s health insurance program.

Left uncertain was the status of the nearly 700,000 young, undocumented immigrants who were brought to the US illegally as children. Democrats, who initially demanded that any spending measure be accompanied by protections for the so-called Dreamers, ultimately relented to Republican leaders in the Senate.

The tactics paved the way for a potentially protracted battle in February, with both parties claiming to have emerged from the shutdown with the upper hand.

Quick Guide All you need to know about a US government shutdown Show What is a government shutdown? When the US Congress fails to pass appropriate funding for government operations and agencies, a shutdown is triggered. Most government services are frozen, barring those that are deemed “essential”, such as the work of the Department of Homeland Security and FBI. During this shutdown, around 25% of the government workforce is placed on unpaid furlough and told not to work. Workers deemed essential, such as active duty military personnel, are not furloughed. Why might the government shut down? The president and members of Congress are at an impasse over what should be included in a spending bill to keep the government open. How common is a shutdown? There have been more than a dozen government shutdowns in the US since 1981, although ranging in duration. The longest occurred under Bill Clinton, lasting a total of 21 days from December 1995 to January 1996, when the then House speaker, Newt Gingrich, demanded sharp cuts to government programs such as Medicare, Medicaid and welfare.

This shutdown is on course to be the longest in US history. What would be the cost of a shutdown? A government shutdown would cost the US roughly $6.5bn a week, according to a report by S&P Global analysts. “A disruption in government spending means no government paychecks to spend; lost business and revenue to private contractors; lost sales at retail shops, particularly those that circle now-closed national parks; and less tax revenue for Uncle Sam,” the report stated. “That means less economic activity and fewer jobs.” Hundreds of thousands of people are not receiving regular paychecks in this shutdown. In previous shutdowns, furloughed employees have been paid retrospectively – but those payments have often been delayed. Sabrina Siddiqui Photograph: Win McNamee/Getty Images North America

Mitch McConnell

The Senate majority leader, Mitch McConnell, reached a deal with his Democratic counterpart on Monday. Photograph: Alex Wong/AFP/Getty Images

It all ended with a promise from Mitch McConnell: the Senate majority leader reached an agreement with his Democratic counterpart, Chuck Schumer, to move to a debate on immigration after reopening the government.

But to skeptics, McConnell’s commitment was hardly ironclad – nor did it provide any assurance that the Senate would actually pass legislation granting legal status to Dreamers. Immigration advocates were quick to call into question whether McConnell could be trusted to keep his word, a line that was echoed by progressive Democrats.

“It would be foolhardy to believe that he made a commitment,” Kamala Harris, a senator from California, said of McConnell.

That’s not to say McConnell won’t be under pressure to keep his word. Jeff Flake, a senator from Arizona, warned of the potential ramifications if Republican leaders were to operate in bad faith.

“A commitment made this public, with this much fanfare, that’s kind of hard to back away from just three weeks from now,” Flake said.

Chuck Schumer

While Democrats blamed Trump, Republicans branded the impasse a ‘Schumer shutdown’. Photograph: Joshua Roberts/Reuters

When Schumer met privately with the president on Friday in the hopes of averting a shutdown, the Senate minority leader appeared to be willing to give away the store.

Schumer offered him everything from funding for a border wall to levels of defense spending higher than what the Trump administration requested. The White House nonetheless rejected the top Democrats’ offer, paving the way for Republicans to brand the impasse the “Schumer shutdown”.

Initial polling does not place blame solely at the feet of Democrats. But progressives and immigration advocates appeared to sour on Schumer for failing to secure more than a pledge from McConnell on immigration.

That could soon change, if Schumer’s calculation proves true that the onus is now on Republicans to either declare their support for Dreamers or be blamed for exposing the young immigrants to deportation.

But for now, Schumer was left to weather the storm, which included the liberal group Credo dubbing him “the worst negotiator in Washington”.

Donald Trump

Donald Trump was largely missing from post-shutdown negotiations. Photograph: Kevin Lamarque/Reuters

The president was largely missing from negotiations during the shutdown, which occurred on the first anniversary of his inauguration. After meeting with Schumer hours before the shutdown, Trump left the matter to congressional leaders.

Barring a few phone calls over the weekend, and the occasional tweet, Trump showed an unusual lack of interest in what a deal to reopen the government might ultimately look like. The president did, however, signal he was going to take a hard line in the pending debate over Dreamers, issuing a statement decrying “very unfair illegal immigration”.

Quick Guide What is Daca and who are the Dreamers? Show Who are the Dreamers? Dreamers are young immigrants who would qualify for the Deferred Action for Childhood Arrival (Daca) program, enacted under Barack Obama in 2012. Most people in the program entered the US as children and have lived in the US for years “undocumented”. Daca gave them temporary protection from deportation and work permits. Daca was only available to people younger than 31 on 15 June 2012, who arrived in the US before turning 16 and lived there continuously since June 2007. Most Dreamers are from Mexico, El Salvador, Guatemala and Honduras, and the largest numbers live in California, Texas, Florida and New York. Donald Trump cancelled the program in September but has also said he wants Congress to develop a program to “help” the population. What will happen to the Dreamers? Under the Trump administration, new applications under Daca will no longer be accepted. For those currently in the program, their legal status and other Daca-related permits (such as to work and attend college) will begin expiring in March 2018 – unless Congress passes legislation allowing a new channel for temporary or permanent legal immigration status – and Dreamers will all lose their status by March 2020.

Technically, as their statuses lapse they could be deported and sent back to countries many have no familiarity with. It is still unclear whether this would happen. Fear had been rising in the run-up to last week’s announcement. Those with work permits expiring between 5 September 2017 and 5 March 2018 will be allowed to apply for renewal by 5 October. What does the recent ruling by Judge William Alsup mean? In his ruling, Alsup ordered the Trump administration to restart the program, allowing Daca recipients who already qualify for the program to submit applications for renewal. However, he said the federal government did not have to process new applications from people who had not previously received protection under the program. When the Trump administration ended the Daca program, it allowed Daca recipients whose legal status expired on or before 5 March to renew their legal status. Roughly 22,000 recipients failed to successfully renew their legal status for various reasons. Legal experts and immigration advocates are advising Daca recipients not to file for renewal until the administration provides more information about how it intends to comply with the ruling. “These next days and weeks are going to create a lot of confusion on the legal front,” said Marielena Hincapie, executive director of the National Immigration Law Center, which has filed a separate lawsuit against the Trump administration’s termination of Daca. Joanna Walters

Whether Trump will more actively engage in the next round of negotiations remains to be seen. But in a parting shot from the Senate floor as the shutdown neared its end, Schumer made it clear Trump had missed an opportunity: “The great deal-making president sat on the sidelines.”

Paul Ryan

Paul Ryan at the US Capitol in Washington on Monday. Photograph: J Scott Applewhite/AP

With the shutdown triggered by gridlock in the Senate, the House speaker was somewhat removed from the spectacle.

After advancing a short-term extension last week to avert a shutdown, Republican leaders adjourned the House in a bid to jam the Senate. And they succeeded.

The only concession Ryan was forced to make was accepting a shorter deadline than what he proposed. (The stopgap measure funds the government through 8 February, as opposed to 16 February.) Ryan also reportedly made undisclosed promises to the House Freedom Caucus, but thus far the conservative group has mostly fallen in line behind the speaker.

The question remains how Ryan, who claims to support enshrining protections for Dreamers into law, will navigate immigration in the coming weeks. If the Senate does succeed in passing a compromise, the pressure will escalate on Ryan to bring the bill up for a vote, potentially igniting the fury of immigration hardliners in the House.

Nancy Pelosi

Nancy Pelosi, the Democratic house minority leader, speaks during a press conference. Photograph: Jim Lo Scalzo/EPA

With Democrats holding sufficiently less influence in the House, Pelosi was left largely unscathed from the politics of the shutdown. The minority leader backed Democrats’ strategy to oppose any spending measure that did not extend protections to Dreamers, but she was hardly the face of it.

Unlike in the Senate, Republicans do not require Democratic votes to pass legislation in the House. As a result, Pelosi was able to distance herself from Schumer’s deal with McConnell, telling reporters on Monday: “I don’t see that there’s any reason – I’m speaking personally and hearing from my members – to support what was put forth.”

Pelosi’s role has thus consisted of rallying her troops, which she sought to do on Monday as the shutdown came to a close. In a letter to members, Pelosi wrote: “While today’s vote ends the Trump Shutdown, it does not diminish our leverage.”