The federal government is set to shut down at the end of Friday unless congressional negotiators can strike a last-minute deal to fund the government. But it’s not really the fight over government funding that has driven Congress to impasse: It is, at least in large part, a disagreement over immigration.

Specifically, it’s a fight over about 700,000 undocumented immigrants who were brought to the United States as children. Democrats want the spending bill to contain a guarantee that those immigrants — known as “dreamers” — won't be deported, and they’re not willing to extend funding for the government, even for a short time, unless they get it.

It’s a rare moment of leverage for Democrats, as Republicans need help from at least nine Senate Democrats to pass a spending bill. And Democrats are trying to use that leverage to resolve an immigration struggle that has been simmering for nearly two decades.

Here are some of the key developments that brought us here.

August 2001: Sens. Richard J. Durbin (D-Ill.) and Orrin G. Hatch (R-Utah) introduce the Dream Act, which creates a pathway for young undocumented immigrants to become permanent legal residents.

December 2010: The Dream Act dies in the Senate in a narrow 55-41 vote after passing the House.

June 2012: Under intense pressure from immigration activists, President Obama announces hundreds of thousands of young immigrants can, if they meet certain conditions, receive a temporary reprieve from deportation and have the chance to apply for a work permit. Over the next several years, hundreds of thousands of the dreamers turn over their personal information to the federal government and receive protection under the Deferred Action for Childhood Arrival program.

November 2016: Donald Trump is elected president and Republicans secure control of the House of Representatives and Senate. Trump picks then-Sen. Jeff Sessions (R-Ala.), widely seen as the senator most hostile to Obama’s immigration agenda, to serve as his attorney general.

Sept. 5, 2017: Faced with several lawsuits by attorneys general in Republican-led states challenging the constitutionality of the DACA program, Sessions announces that the executive branch will slowly phase it out rather than defend it in court. The White House calls on Congress to find a solution for the dreamers, but does not say it believes the dreamers should be deported.

Sept. 7, 2017: Congress passes a bill that keeps the government funded until early December and provides emergency assistance to the victims of Hurricane Harvey. Every Senate Democrat votes for it, although Rep. Luis Gutierrez (D-Ill.) vocally opposes it for not doing anything to ensure protection for the dreamers.

Sept. 13, 2017: After a meeting at the White House, reports quickly emerge that Trump has agreed with Senate Minority Leader Charles E. Schumer (D-N.Y.) and House Minority Leader Nancy Pelosi (D-Calif.) on the broad outlines of a deal to protect the dreamers in exchange for more money for border security. But the White House immediately pushes back against reports that Trump has agreed to leave funding for a wall along the U.S.-Mexico border out of a deal.

Oct. 25, 2017: Sen. Kamala D. Harris (D-Calif.), the daughter of two immigrants and a rumored 2020 presidential contender, becomes the first Senate Democrat to publicly vow to vote against government spending bills that do not protect the dreamers. Sens. Bernie Sanders (I-Vt.), Elizabeth Warren (D-Mass.), and Kirsten Gillibrand (D-N.Y.) soon follow Harris. 

Dec. 21, 2017: Facing a government shutdown, Congress agrees to extend existing government funding levels. Now, 17 Senate Democrats vote against the spending bill because it leaves the dreamers’ fate unaddressed.

Jan. 10, 2018: A federal judge rules that the Trump administration cannot end the DACA program, saying safeguards must remain in place amid a legal dispute over the program. The Trump administration immediately protests, with the Justice Department taking the unusual step of petitioning for the case to be immediately brought to the Supreme Court.

Jan. 11, 2018: A bipartisan team spearheaded by Sens. Jeff Flake (R-Ariz.), Lindsey O. Graham (R-S.C.), and Dick Durin (D-Ill.) reaches a bipartisan deal on immigration and takes it to the White House, where it is rejected by Trump and immigration conservatives. Trump suggests the U.S. in taking too many immigrants from countries such as Haiti, El Salvador and some African nations — and too few from places such as Norway. The comments leak and throw the talk into further turmoil.

Jan. 18, 2018: House Republicans pass a spending bill to keep the government open for just one month and extend the Children’s Health Insurance Program. The bill, which passes on a nearly party-line basis, is dead-on-arrival in the Senate.

Jan. 19, 2018: Senate Democrats refuse to take up the bill passed by the House, and they have the votes to filibuster it, despite McConnell’s protests.