Senate Democrats agreed to support a short-term spending bill Monday, bringing the government shutdown to an end. The deal keeps the government open through Feb. 8, and included a pledge by Senate Majority Leader Mitch McConnell to hold a vote on the Deferred Action for Childhood Arrivals program, or DACA, if Congress doesn’t find a solution before then.

The shutdown went into effect at 12:01 a.m. on Saturday, and will have lasted less than three days by the time the government officially reopens later Monday. But while the shutdown is over, the debate over who was to blame for the political crisis will continue in the days and weeks to come.

Here’s a guide to the political winners and losers from the 2018 shutdown.

Democrats

Did Democrats come out looking good or bad by refusing to vote with Republicans to avoid a shutdown? It depends on your point of view. President Donald Trump hammered Democrats, accusing them of favoring protections for undocumented workers over keeping the government open.

Republicans also noted that during the last government shutdown, Democrats lambasted the GOP for forcing a shutdown over a single issue (health care, in that case) — even though now they’re doing the same exact thing.

It’ll be hard for Democrats to duck the Republicans’ charge that they’re being hypocritical after opposing the last shutdown, which took place in 2013. Back then, public polls showed that Americans blamed Republicans much more for the shutdown than Democrats. This time around, the polling was more even. According to a Politico/Morning Consult poll taken late last week, before the shutdown started, 41 percent of voters blamed Republicans, compared to 36 percent who blamed Democrats.

It’s exactly the type of bare knuckles, oppose-everything spirit that many on the left — especially progressives — have been looking for since Trump took office.

On the other hand, by refusing to back down on DACA, which protects young undocumented immigrants from being deported, Democrats drew a line in the sand on an issue that’s immensely popular with the party’s base. It’s exactly the type of bare knuckles, oppose-everything spirit that many on the left — especially progressives — have been looking for since Trump took office. So while conservatives voters may see Democrats as hypocritical obstructionists, liberal voters will likely be cheering them on.

Republicans

Republicans certainly look better than they did the last time around. As mentioned above, the 2013 shutdown was a political nightmare for the GOP. House Republicans forced the shutdown to try and change the health care law. The effort failed, across the board. This situation is very different, in no small part because the party controls the White House and both chambers of Congress, which wasn’t the case five years ago.

It’s true that voters don’t like it when Congress malfunctions, and many will hold the party in power accountable, as some early polls show. From a good governance perspective, government shutdowns are a sign of incompetence, or, even worse, putting political gamesmanship over what’s best for the country.

Still, Republicans can make a credible argument that they negotiated in good faith only to watch their efforts blow up because Democrats refused to cooperate. And the fact that the deadline for dealing with DACA isn’t until March helps bolster the GOP claim that the Democrats’ sense of urgency on the issue was overblown.

In the end, it likely won’t be a clear win for Republicans in Congress. But they’ll come away with a decent argument for why they shouldn’t be blamed for the shutdown. The big question will be if the public agrees when it comes time to vote this fall.

President Donald Trump

Again, it’s tricky. On the one hand, in the 2016 presidential election Trump campaigned as a smart executive who would run the country like a successful private business. Part of his appeal to voters stemmed from his argument that Washington was broken, and that he alone could fix it.

That vision doesn’t square with a government shutdown, plain and simple. From that vantage point, Trump failed to make the trains run on time. Critics will say it’s a permanent stain on his record, and they’ll have a point.

But on the other hand, Trump also campaigned as a nationalist, hard-line immigration opponent. He vowed to stem the flow of illegal immigrants into the country and beef up border security. So refusing to compromise with Democrats on DACA — a crucial factor that led to the shutdown — will likely win Trump big points with his conservative base. From that point of view, Trump took a principled stand on an issue at the core of his political beliefs.

The issue is, Trump doesn’t need to win a popularity contest on the far right. A solid chunk of the electorate — around 30 to 40 percent — support him, and that doesn’t seem likely to change anytime soon. What Trump has struggled and so far failed to do is expand his base of support. A government shutdown won’t help him do that.

Supporters will applaud him, and opponents will pile on. And Trump will probably emerge in the same place he was before the shutdown: controversial, divisive, unpredictable, and stuck with an approval rating well below 50 percent.

The timing of the shutdown was also bad for Trump, as it came on his first-year anniversary in office. For detractors, it’ll be just another sign of his chaotic approach to the presidency. It’s not the way Trump likely wanted to mark the occasion. But as with so many other moments in the past year, there’s a good chance it won’t significantly move the needle for Trump one way or the other. Supporters will applaud him, and opponents will pile on. And Trump will probably emerge in the same place he was before the shutdown: controversial, divisive, unpredictable, and stuck with an approval rating well below 50 percent.

House Freedom Caucus

What a difference a few years can make. In 2013, the far-right conservatives who helped lead the shutdown had not yet formally organized into what would become the Freedom Caucus. But they had already begun developing a reputation for refusing to compromise and a willingness to buck House GOP leadership.

Since Trump took office, however, the group’s approach has begun to evolve. It helped pass the House health care bill last year, and provided crucial votes for the tax bill as well. And when it came to funding the government, the Freedom Caucus didn’t stand in the way, proving that the group is taking steps towards becoming a savvier power bloc in the House — one that’s willing to strike deals instead of just voting no.

The House Freedom Caucus will remain a hated entity on the left. And its members, led by Rep. Mark Meadows, R-N.C., will continue clashing with the House’s wing of moderate Republicans on many issues. But the group is delivering votes for House Speaker Paul Ryan, and that alone is a big change. When the caucus members face voters this fall, they’ll say that they helped the House pass a bill to keep the government open, and they’ll be right. It’s no small thing, given the group’s tumultuous past few years.