Immigration isn’t the only sticking point.

No sooner had a midnight deadline passed without congressional action on a must-pass spending bill than lawmakers launched their time-honored competition over who gets the blame for their collective failure. The Senate floor became a staging ground for dueling speeches early Saturday morning, and lawmakers of both parties—as well as the White House and political-activist groups—flooded the inboxes of reporters with prewritten statements castigating one side or the other.

Led by President Trump, Republicans accused Senate Democrats of holding hostage the entire government and health insurance for millions of children over their demands for an immigration bill. “This is the behavior of obstructionist losers, not legislators,” the White House said in a statement issued moments before the clock struck midnight. In a series of Saturday-morning tweets, Trump said Democrats had given him “a nice present” for the first anniversary of his inauguration. The White House vowed that no immigration talks would occur while the government is closed, and administration officials sought to minimize public anger by allowing agencies to use leftover funds and by keeping national parks and public lands partially accessible during the shutdown—in effect, by not shutting down the government as fully as the Obama administration did in 2013.

Democrats in turn blamed Republicans and Trump for a basic failure to govern, noting that this shutdown is the first in history to occur when a single party controls both chambers of Congress and the White House. And they blamed Trump for repeatedly backing out of agreements that would have resolved the dispute.

The last shutdown in 2013 was a fairly straightforward ideological fight: Under pressure from conservatives, Republicans refused to fund the government for 16 days in an ultimately futile bid to deny money for the Affordable Care Act. This time around, immigration is at the center of the impasse. But the dynamics are more complicated than they were in 2013, involving not only young immigrants, but also children’s health care, military spending, and an inexperienced president whose tumultuous first year in office ended, perhaps predictably, in crisis.

Here’s a rundown of the factors at play:

DACA

This is the biggest cause of the shutdown. Ever since Trump announced in September that he would end the Obama-era Deferred Action for Childhood Arrivals program on March 5 unless Congress acted to extend it, Democrats in the House and Senate have been clamoring for a permanent legislative fix to protect the young immigrants known as Dreamers.

Prospects for a quick agreement brightened briefly in September after Trump appeared to sign off on a framework with Democratic leaders Nancy Pelosi and Charles Schumer; that plan would have traded the Dream Act for additional security at the border. But under pressure from immigration hard-liners, Trump backed away and added a whole new set of demands for a DACA deal, including funding for his border wall and significant changes to the legal immigration system.

Pelosi promised immigration activists that Democrats would not leave for the year without addressing DACA, but Senate Democrats agreed just before Christmas to punt the fight to January. With Friday’s funding deadline approaching and no immigration agreement in sight, Democrats in both the House and Senate this week decided to make a stand.

Long-term budget deal

The reason Democrats have leverage to demand an immigration deal in exchange for their votes to keep the government open is that Congress has repeatedly blown past spending deadlines. The fiscal year began October 1, but instead of passing full-year appropriations for each federal department and agency, or bundling them all into an omnibus, lawmakers have relied on a series of stopgap spending bills known as continuing resolutions.

The biggest holdup to a bipartisan budget agreement is a fight over whether a significant increase in defense spending demanded by the Trump administration must be matched by an equal boost in domestic spending, which Democrats want. Officials in both parties have said in recent days that the two sides are actually close to a budget deal, but that Democratic leaders won’t give it their blessing until an immigration agreement is also reached. “The caps deal is very, very close and I think Dems are holding out on the caps deal because of these DACA negotiations,” House Speaker Paul Ryan said earlier this week.

A budget agreement would likely go for two years, lessening the chance for a government shutdown through 2019.

Defense spending

It’s not only Democrats who are fed up with short-term spending bills and kicking the proverbial can down the road. Republican defense hawks in the House and Senate have revolted over the lack of a full-year spending bill for the Pentagon, which is particularly hamstrung by continuing resolutions that restrict the Defense Department’s ability to plan ahead. A group of Republicans in the House unsuccessfully pushed to attach a full-year spending bill to the stopgap bill, but GOP leaders rejected the idea on the grounds that it would be easy for Senate Democrats to reject. Yet the issue has prevented Republicans from putting up a united front in the shutdown fight. Four GOP senators refused to vote for a 30-day continuing resolution, undermining the party’s effort to pin the blame for a shutdown solely on Democrats.

CHIP

Like a budget deal, reauthorization of the popular Children’s Health Insurance Program is long overdue. Congress allowed the program to lapse in the fall before lawmakers agreed to a six-month extension in December. To entice Democrats to vote for a stopgap spending bill without an immigration deal—and to attack them if they didn’t—GOP leaders attached a six-year CHIP reauthorization. Republicans even dropped an earlier proposal to pay for the extension with Medicare cuts Democrats had opposed; they did so after the Congressional Budget Office found that a long-term extension would be less costly than first believed, in part because more families would be eligible for government subsidies under the Affordable Care Act and wouldn’t be pushed into the program.

Most Democrats didn’t take the bait. They assailed Republicans as cynically trying to use CHIP as a political wedge after insisting for months on spending cuts Democrats opposed. And they said the GOP was forcing them to choose between health care for children and Dreamers. “This is like giving you a bowl of doggy doo, putting a cherry on top, and calling it a chocolate sundae,” Pelosi said on Thursday.

Republicans, however, said the Democratic opposition was proof they wanted to shut down the government over immigration. Why, they asked, wouldn’t Democrats bank the long-sought extension of CHIP and continue pressing for a DACA deal in the months ahead?

Trump

If there’s one thing Democrats and Republicans (some publicly, many others privately) agree on, it’s that the president’s negotiating style has made it much harder for the two sides to reach a deal. Trump has veered wildly from one extreme to the other—telling lawmakers in one meeting that he’d sign any DACA bill Congress sent him, then issuing a list of hard-line demands in the next. His vulgar reference to African nations, among others, as “shithole countries” while rejecting a bipartisan DACA proposal blew up the negotiations at a critical juncture.

Republicans have begged the president to tell them exactly what he’d accept in an agreement and then stick to it. But Trump hasn’t delivered. “I’m looking for something that President Trump supports, and he has not yet indicated what measure he is willing to sign,” McConnell told reporters this week, in a telling sign of the GOP’s frustration with the president’s inconsistency. “As soon as we figure out what he is for, then I would be convinced that we were not just spinning our wheels.”

Democrats have been even more frustrated, accusing the president of repeatedly backing out of commitments he makes to them in private once he hears from conservative Republicans. That occurred when Trump initially told Senator Dick Durbin of Illinois he would support the immigration deal Durbin struck with Graham and four other lawmakers only to flip his position a few hours later. And, according to Schumer, the president did it again in the final hours before the shutdown began, after the Senate minority leader said he bolstered the Democrats’ offer and put funding for Trump’s border wall on the table. “He backed off at the first sign of pressure,” Schumer complained early Saturday morning after the midnight deadline had passed.

For the shutdown to end, Trump likely has to do one of two things: Negotiate a deal with Democrats himself, stick to it, and sell it to Republicans, or get out of the way and agree to whatever congressional leaders work out.