After much drama and a brief but technical government shutdown, Congress voted to fund the government at roughly 5:30 am Friday — keeping federal agencies open until the end of March.

Lawmakers extended government funding through March 23 in addition to passing a massive deal to increase investments in domestic programs and the military by roughly $300 billion over the next two years, and they increased the debt ceiling for one year. The bill passed at 71-28 in the Senate and 240-186 in the House with bipartisan support.

It wasn’t easy.

Congress actually missed the deadline to fund the government Thursday night after Sen. Rand Paul (R-KY) filibustered the spending and budget bill for increasing the national debt too much, technically allowing the government to run out of money for several hours.

And that wasn’t the only contentious political back-and-forth of the night.

House conservatives mounted a mini revolt when they, like Paul, raised concerns about the massive spending increase. This forced Republican leadership to seek Democratic support in the lower chamber.

It was a tough sell for House Democrats. The budget agreement sets aside the question of immigration and what to do about the sunsetting Deferred Action for Childhood Arrivals (DACA) program, which was at the heart of the standoff in January that ended in a three-day shutdown.

Led by Minority Leader Nancy Pelosi, Democrats threatened to shut down the government if House Speaker Paul Ryan didn’t give assurances of a DACA fix vote. In the end, enough Democrats voted for the spending bill to offset the conservatives who didn’t vote for it. But they made sure Republicans sweated on the floor, withholding their support until the very last minute.

Pelosi censured Ryan on the House floor saying, “For some reason, I think the speaker thinks he is the speaker of the White House rather than the speaker of the House.”

Ryan, who has refused to give Pelosi firm assurances on immigration, says he will allow a DACA vote as long as it has the president’s blessing. But negotiations on immigration have largely stalled in the last month, stuck between the moderate-but-passable proposals that the White House won’t support and conservative Trump-endorsed proposals that won’t see the light of day in the Senate.

“My commitment to working together on an immigration measure we can make law is a sincere commitment. We will solve this DACA problem,” Ryan said on the House floor before the vote.

With the contentious spending and budget debates off the docket, for now, lawmakers can focus on what will undoubtedly be a difficult immigration debate in the weeks ahead.

The short-term spending bill and massive budget deal, explained

Congress came to an agreement that will fund the government through March 23. This will give congressional staff the time to write bigger appropriations bills that would actually fund the federal government under the parameters set by the new budget caps.

That will amount to significant increases in spending for domestic programs and the military over the next two years.

Specifically, the agreement will:

Extend funding for the Children’s Health Insurance Program (CHIP) for 10 years

Fund community health centers for two years

Include $80 billion in disaster relief funding

Put $6 billion in funding toward opioid and mental health treatment

Set aside $5.8 billion for the bipartisan Child Care Development Block Grant

Put $4 billion toward the Veterans Administration to rebuild and improve veterans hospitals and clinics

Send $2 billion to research at the National Institutes of Health

Put $20 billion toward infrastructure, including highways, water, wastewater, and rural broadband

Set aside $4 billion for college affordability programs for police officers, teachers, and firefighters

And add $7 billion in funding and a two-year reauthorization for community health centers

This budget deal is the result of a fight that goes back to 2011 when an Obama-era impasse over the debt ceiling brought the American economy to near calamity. It ultimately resulted in the 2013 sequester: across-the-board budget cuts and budget caps that would amount to $1.2 trillion in cuts over the next 10 years.

Congress has repeatedly voted to raise the budget caps. Since the 2013 sequester, there have been two bipartisan deals to raise the caps by billions of dollars. The first in 2013 was forged between Rep. Paul Ryan and Sen. Patty Murray; a second was agreed on in 2015. But those adjustments, which extended through fiscal year 2017, had expired.

With these budget caps, appropriators — the lawmakers in charge of the nation’s purse strings — can begin putting together a trillion-dollar spending bill that would fund the government through next September.

Meanwhile, the immigration debate still has a long way to go

When Democrats and Republicans voted to reopen the government in late January, the idea was they would spend the following weeks cobbling together a deal on immigration and more permanent government spending in the weeks ahead.

But the actual legislative calendar shrank that window for negotiation, and talks have since increasingly splintered. Now Democrats have voted to fund the government again, hoping negotiations will focus on DACA.

In the Senate, Mitch McConnell’s much-anticipated — and very mysterious — immigration floor debate is expected to kick off next week. Lawmakers on both sides of the aisle hope the public negotiations will result in a bipartisan bill that addresses the nearly 700,000 undocumented immigrants currently protected from deportation.

But political headwinds in the House are stronger and remain largely unchanged. For weeks, conservative hardliners have commandeered immigration negotiations. To win enough House Republican votes for the short-term spending bill two weeks ago, Ryan promised the Freedom Caucus, the lower chamber’s group of ultraconservatives, that Republican leadership would whip votes for a conservative immigration bill.

Conservatives continue to say there is a path to compromise, but they have shown no willingness to work with Democrats thus far. Ryan has said he will only bring up a bill for a vote if it has President Donald Trump’s blessing, and if it has the support of the majority of the Republican conference — two contingencies that are hard to reconcile with what has to be a bipartisan DACA fix.

Two weeks ago, Trump’s administration briefed Republican congressional aides on an immigration proposal that called for a path to citizenship for 1.8 million undocumented immigrants who came to the country as children, $25 billion to fund a southern border wall, substantial curtailing of family immigration, and the elimination of the diversity visa lottery program, which would gut the legal immigration system.

The proposal was largely interpreted as a White House alternative to the one bipartisan proposal by Durbin and Sen. Lindsey Graham (R-SC) on immigration that Trump has already shot down.

Both Republican leaders in the House and Senate supported the clarity offered by the White House proposal but made no commitments to the actual policy. By the following week, House Republicans were still discussing the partisan immigration proposal by Rep. Bob Goodlatte (R-VA), which is unlikely to garner any Democratic support. And already some Republicans in the Senate have expressed concern with the proposal’s serious cuts to legal immigration.

Meanwhile, several other groups have also continued negotiations on completely separate tracks:

The shutdown also brought together a larger group of bipartisan negotiators — roughly 30 senators who’ve named themselves the “Common Sense Coalition,” who are intent on moving immigration talks forward but have yet to come forward with a proposal.

The team of Democratic and Republican leadership deputies that have been dubbed the “No. 2s,” consisting of Durbin, Minority Whip Rep. Steny Hoyer (D-MD), Majority Whip Sen. John Cornyn (R-TX), and Majority Leader Rep. Kevin McCarthy (R-CA), have also been negotiating.

There are two more Democratic-friendly bipartisan proposals in the House and Senate, proposed by Reps. Will Hurd (R-TX) and Pete Aguilar (D-CA) and Sens. John McCain (R-AZ) and Chris Coons (D-DE), both of which propose slimmed-down DACA and border security fixes; both are still in early stages.

In short, the state of immigration negotiations in Congress remains decentralized and disjointed.