The appointment of ex-FBI director Robert Mueller as special counsel overseeing an investigation into Russian interference in the 2016 election — and potential Russian connections to President Trump and his allies — is another surprising development after a week full of them. Consider: Trump fired FBI Director James Comey, who was investigating the potential Russia-Trump ties, only to now have Comey’s predecessor at the FBI take over the investigation. And Trump’s deputy attorney general, Rod Rosenstein, who was being mocked by Democrats for his role in Comey’s firing, has now made an appointment that is being praised by Eric Holder, Barack Obama’s attorney general. The president, whose aides were advocating that the Russia investigation end soon, must now watch as Mueller quits his law firm job to devote himself full time to this assignment.

So what does this all mean? We won’t ultimately know for some time. But the Mueller appointment and the surrounding controversy around Trump and Russia remains as much a political issue as a legal one. So let’s look at how this affects the relevant political players.

Why this is good for Trump

Although the simple case is that Mueller’s appointment is not welcome news for Trump — the White House was surprised by the announcement — it does have some plausible benefits for the president, especially in the near term. The Russia investigation had been dogging the Trump administration, and his firing of Comey had turned into a debacle.

Trump can now say there is an independent investigation going on, by someone he did not personally appoint and who is not beholden to his party. And Mueller has very strong credentials. The president and his team, in theory, can turn the focus to governing, while deferring questions about the investigation. And maybe Comey, who appears to have notes of every conversation he has had with the president, will share them with Mueller and not The New York Times. (That said, as of late Wednesday, Trump had not yet reacted to Mueller’s appointment — a poorly worded Twitter rant could mitigate any short-term benefit for Trump.)

It’s also possible Mueller will interpret his mandate as limited to Russia and the election. It’s not clear Mueller would be investigating, for example, the details of Comey’s firing. That would be to Trump’s benefit.

Most importantly, Mueller can exonerate the president. If this is a high-risk development for Trump, it also comes with a big reward if Trump hasn’t done anything seriously wrong.

Why this is bad for Trump

Mueller’s appointment ensures that the Russia controversy won’t just go away — at least not anytime soon. And he could gravely threaten Trump’s presidency if he finds clear, improper connections between the president’s campaign and Russian officials. There was a reason that Republicans on Capitol Hill and the Trump administration were trying to stop the appointment of a special counsel. Prosecutors with broad authority to investigate can cause major problems. Just ask Bill Clinton.

Trump could in theory order Rosenstein to fire Mueller. But that would be exactly what Richard Nixon did, ordering his Justice Department to dump the special prosecutor investigating the president.

Why this is good for congressional Republicans

Republican members were being repeatedly asked about the Trump investigation. Like Trump, they can now defer to Mueller’s probe. This will make them very happy. And in the long run, Mueller helps them avoid the awkward circumstance of investigating their own president. A damning report will make it easier to call for Trump’s resignation, if strong evidence emerges. Alternatively, a report that absolves Trump could take the Russia issue off the table without Republicans looking like they’d engaged in a partisan cover-up.

More importantly, Republicans now have more room to get back to their policy goals, such as tax reform and Obamacare repeal. Mueller’s investigation is likely to take months. While that unfolds, Trump can sign into law bills passed by Republicans in the House and the Senate.

Why this is bad for congressional Republicans

We’re not going to do fake balance here. This may or may not end up as good news for Trump — but it’s almost certainly good news for congressional Republicans.

The one problem? Mueller is only investigating the Russia issue. It’s likely Trump will do something else controversial — in the past two weeks alone, he allegedly shared highly classified intelligence with the Russians, and he fired Comey in a clumsy way that created all kinds of political problems. Republicans will still have to answer for Trump’s other controversial moves.

Why this is good for Democrats

Just reread the “bad news for Trump” paragraph from above. An investigation of the 2016 election, Trump and his allies could turn up damaging information. A report written by Mueller will have credibility. It’s far more likely that Mueller, as opposed to GOP-led congressional committees, will release information damaging to the president. And the timing of the investigation could be good for Democrats, keeping Russia in the news through the midterm year, even if it results in a slowdown in headlines now.

But we should not ignore real-world impacts or lose sight of the big picture. Democrats strongly disagree with Republicans like Mitch McConnell and Paul Ryan on policy, including on sweeping issues currently on the congressional docket such as health care and taxes. In the eyes of many Democrats, Trump and the potential laws he might sign could damage the country for years to come. A process that could (in the long run) lead to Trump’s removal from office is a major step for liberals.

Why this is bad for Democrats

In the short term, they may have lost an issue. Polls showed an overwhelming majority of Americans (78 percent, according to a recent NBC News/Wall Street Journal survey) wanted some kind of investigation of Trump’s alleged ties to Russia from outside of Congress. Democrats could have pounded Trump and Republicans on their lack of accountability every day till next year’s midterms.

Mueller has a reputation for independence, like Comey. How he approaches this investigation is unpredictable, and that has risks for Democrats. (Ask Hillary Clinton.) And because Democrats have effusively praised Mueller’s appointment, they’ll have trouble criticizing him later on — or re-litigating the Russia issue — if he exonerates Trump.

What would have been more predictable? A House Judiciary Committee investigation in 2019 led by Democratic Chairman John Conyers, being cheered on by Democratic Speaker Nancy Pelosi. Make no mistake: If Democrats had won control of Congress next year and Trump had blocked a special counsel up until then, impeachment would have been on the table. Now, Democrats have to wait and see what Mueller concludes.

Why this is good for the public

By all accounts, Mueller seems to be respected by all sides.