Given all that we’ve seen transpire over the past two years (the second anniversary of Donald Trump’s campaign announcement is Friday), it’s surprising that we can still be surprised. Yet, when reports emerged Monday evening that President Trump might be considering the ouster of Robert S. Mueller III as special counsel investigating Russian meddling in the 2016 presidential campaign, it was hard not to be taken aback. Last week, the talking points released for James B. Comey’s testimony on Capitol Hill had Trump’s allies insisting that they were “pleased the investigative process is moving forward.” Now, speculation that the most significant investigation would be uprooted?

As with so many things in Washington, firing Mueller would be complicated. Unlike many things in Washington, though, that complexity is by design.

At Lawfareblog, Jack Goldsmith walked through what it would take for Trump to cast aside Mueller. With his permission, we’ve used his guide to create a simplified flowchart of how that might work.

How Mueller was appointed

We have to start with a reminder of how Mueller ended up as special counsel.

Mueller was appointed under the provisions of regulations drafted in 1999 after an existing law, the Ethics in Government Act, expired. Those provisions allow the attorney general to appoint an investigator who operates largely outside of the jurisdiction of the Justice Department.

In this case, that responsibility fell to Rod J. Rosenstein, the deputy attorney general who was confirmed shortly after Attorney General Jeff Sessions recused himself from anything involving the investigation of Russian meddling.

With Sessions out of the picture, Rosenstein appointed Mueller last month.

How Mueller could be ousted

So let’s now assume that Trump actually decides to fire Mueller. Below, a flowchart of how that might progress, with each step labeled. Those labels are explained below.

1. The first question is whether Trump even bothers trying to follow the existing process to oust Mueller. Goldsmith’s analysis points to an argument that Trump could simply say that the mandates of those regulations violate his constitutional powers and fire Mueller directly. (An assessment from Marty Lederman at the Just Security blog rejects this idea outright.) Such a move would be challenged, understandably, but if it were somehow upheld by the courts, Mueller would be out.

If it weren’t, or if Trump didn’t take this unusual step? We continue.

2. Another question is whether Sessions tries to find some loophole allowing himself to no longer be bound by the recusal he announced in March. He didn’t consider himself bound by that recusal when drafting a letter to Trump advocating Comey’s firing, even though he was actively investigating the Russian meddling, but it’s harder to see how he could simply re-inject himself in the special counsel decision. That said, there doesn’t appear to be anything preventing him from doing so — with the exception of political repercussions that would almost certainly include impeachment.

3. Let’s assume that we go through the normal process. As in the first diagram, the firing of Mueller falls to Rosenstein.

It’s highly unlikely that Rosenstein would agree with Trump that Mueller needs to be removed, for reasons we’ll get to in a second. If he didn’t agree, he could reject Trump’s request — and risk being fired. Or he could follow the tradition established in 1973 when the attorney general and deputy attorney general resigned rather than comply with President Richard Nixon’s demand that the special investigator looking at Watergate be fired.

4. If, on the other hand, Rosenstein (or any of the other people in the chain of command that follows below) decided to comply with Trump, they would have one of two options for doing so, according to Goldsmith. Either they’d have to throw out the regulations binding the firing of Mueller (see Goldsmith’s post for a lot of detail on this) or they’d have to establish cause for firing him.

If either of those things is done, Mueller is fired. But the former would be exceptional and, given the bounds of the possible causes for firing special counsel — “misconduct, dereliction of duty, incapacity, conflict of interest, or for other good cause, including violation of Departmental policies” — it’s unlikely that a viable case for firing Mueller could be made in good faith at this point. If a cause can’t be found by Rosenstein, it’s hard to see how he could continue in that position.

5. With Rosenstein and Sessions out of the picture, the decision falls to Rachel Brand, who faces the same decisions as Rosenstein. If she ends up leaving the picture, it falls to Dana Boente, acting assistant attorney general for national security. If he demurs or won’t dump the regulations/can’t find cause, we keep going.

In 1973, the third person in line was the solicitor general, Robert Bork, who agreed with Nixon’s decision. It’s not clear if the acting solicitor general, Jeffrey B. Wall, would be part of this line of succession. If any other Justice officials are confirmed in the period between our writing this and Trump’s decision to fire Mueller, those officials could be slotted in here.

6. At this point, Goldsmith writes, an executive order signed by Trump in March comes into play. It outlines the order of succession in the Department of Justice, running through three U.S. attorneys as next-in-line to leadership. (The first is the U.S. Attorney for the Eastern District of Virginia, who happens to be Dana Boente.)

As acting heads of the department, they’d be faced with the same choice as Rosenstein. If each of them demurred, it’s not really clear what would happen — though it’s likely that this might prompt Trump to appeal to the option in step one, ignoring the regulations entirely.

What’s outlined above is simply the process by which Mueller could legally be removed from his position. What’s not considered (beyond that aside for Sessions) are the political repercussions. While Congress has given Trump a decent amount of leeway on the Russia investigation to this point, Trump’s explicitly removing the person leading an outside inquiry would almost certainly significantly heighten the political pressure he faces.

But as we’ve seen over the past two years: That doesn’t mean he won’t do it.