White House counsel Don McGahn will depart the administration later this year amid tensions over his role in special counsel Robert Mueller’s investigation.

McGahn’s intentions to leave this year have been reported for months, but after Axios reported it with more certainty Wednesday, President Donald Trump removed any ambiguity on the matter with a tweet:

White House Counsel Don McGahn will be leaving his position in the fall, shortly after the confirmation (hopefully) of Judge Brett Kavanaugh to the United States Supreme Court. I have worked with Don for a long time and truly appreciate his service! — Donald J. Trump (@realDonaldTrump) August 29, 2018

Yet reporters were soon told that Trump had not in fact discussed the timing of McGahn’s departure with him before sending this tweet, making this a firing of sorts — albeit of someone who was already on his way out the door.

The context to all this is in a series of leaks that have portrayed McGahn as resistant to Trump’s efforts to interfere with the Justice Department and the Mueller investigation and even downright cooperative with Mueller’s probe. The latest of these were two New York Times reports that McGahn had talked extensively to Mueller’s team and hadn’t fully informed Trump’s lawyers about what he was saying.

We don’t yet know the full story of McGahn’s role in certain underlying events Mueller is investigating — the president’s firings of National Security Adviser Michael Flynn and FBI Director James Comey, his pressures on Attorney General Jeff Sessions, and even his attempt to fire Mueller himself. We also don’t yet know what McGahn may have told Mueller, and whether it might reflect badly on the president. But McGahn is departing the White House in a tense set of circumstances indeed.

Who is Don McGahn?

For years, Don McGahn was best known as a campaign finance and election lawyer who was very well-connected in Washington Republican circles. These ties earned him an appointment as commissioner of the Federal Election Commission, where he was a stalwart defender of the Republican Party’s interests between 2008 and 2013.

But in 2015, McGahn — then working for the firm Jones Day — made a somewhat surprising choice for a GOP establishment insider: He decided to take on political work for Donald Trump. Indeed, McGahn got on the Trump train remarkably early. In February 2015, months before Trump entered the race, the Washington Post reported that McGahn was “counseling” Trump as he considered a bid.

McGahn was a smart hire for Trump — he was a consummate campaign professional who would advise the outsider candidate in the unfamiliar area of election law. (He may have come on Trump’s radar because of a family connection — McGahn’s uncle Paddy had done legal work for Trump in Atlantic City in the 1980s.)

As for McGahn’s motivations, a Washington Post profile by Ben Terris suggests that his main interest may have been a big paycheck. McGahn had gotten the Jones Day job only recently, and one of his first clients — former Rep. Aaron Schock — had failed to pay about $750,000 in legal bills to the firm. McGahn “was under a lot of pressure by management to fill that hole,” a source told the Post.

But of course, Trump shocked the world by winning first the GOP nomination and then the presidency. And since McGahn had been by his side all along, Trump rewarded the attorney by naming him to the important job of White House counsel.

What is the White House counsel?

The attorney general heads the Department of Justice and is often called the administration’s top lawyer. But the White House counsel is the White House’s top lawyer, operating separately from DOJ and working far more closely with the president.

In his book The Terror Presidency, former Bush Justice Department official Jack Goldsmith described the White House counsel’s role as being:

... an all-purpose presidential advisor, ethics monitor, channel of communication between the White House and an increasingly professionalized and independent Department of Justice, and coordinator of administration legal policy.

It’s also helpful to keep in mind what the White House counsel doesn’t do. For one, he or she is not the president’s personal lawyer. That is, the job is not about protecting Donald Trump personally from criminal liability — it’s to represent the presidency of the United States, a government office.

The White House counsel’s separation from the Justice Department is also important to keep in mind. Prosecutorial and investigation decisions reside at DOJ, and under modern norms the president and White House counsel are not supposed to meddle in particular cases. It’s also a DOJ office that has the formal role of issuing legal opinions about the legality of administration actions.

Yet it’s often the White House counsel who takes on the job of interacting with the Justice Department, and, sometimes, in trying to get them to do what the president wants. Often, this takes the form of policy debates — Alberto Gonzales under George W. Bush and Greg Craig under Barack Obama were heavily involved in trying to shape legal policy for the war on terror.

What did Don McGahn do as White House counsel?

Instead of tense policy debates, though, McGahn’s tenure as White House counsel has been notable for two main things.

First is his role in selecting and confirming judicial nominees. Past White House counsels have also had a role in this process, but McGahn took to the task with particular fervor, reviewing lists of potential nominees, narrowing down candidates, and working with the Senate to try get as many of them confirmed as quickly as possible. And he’s had remarkable success — helping fill one and soon perhaps two Supreme Court slots, and getting confirmed two dozen appellate judges and a plethora of district judges to lifetime appointments.

Second, and more thornily, McGahn has played a complex role in the drama over the Mueller investigation. In the early days of the administration, McGahn was involved in White House deliberations about several key events Mueller is investigating. Then after Mueller’s appointment, McGahn’s role got even more complicated — he was questioned by the special counsel for more than 30 hours, and had to continue to grapple with Trump’s efforts to interfere with the probe and the Justice Department.

Flynn, Sessions, Comey, and Mueller: what McGahn saw

McGahn was involved in at least four matters related to President Trump that Mueller is investigating.

1) Trump’s firing of Michael Flynn: Just days after Trump became president, the FBI questioned his new national security adviser, Michael Flynn, about contacts he’d had with Russian Ambassador Sergey Kislyak during the transition. Flynn’s answers did not match what intelligence intercepts from surveillance of Kislyak showed — suggesting he’d lied to the FBI and perhaps to administration officials like Vice President Mike Pence as well.

Don McGahn was the first White House official to learn about this problem. Sally Yates — the Obama holdover serving as acting attorney general while Jeff Sessions was awaiting confirmation — extensively briefed McGahn on Flynn’s interview, on January 26 and 27. McGahn then briefed other White House officials, including Trump, on what he’d learned.

Yet the White House took a curiously long time to act on this seemingly damning information. Eighteen days passed between McGahn’s first briefing and Flynn’s firing, and Mueller reportedly wants to know why.

2) Trump’s efforts to prevent Jeff Sessions’s recusal: Barely two weeks after Flynn’s dismissal, it was Attorney General Sessions who was under fire. Though he’d testified to Congress that he’d had no contacts with Russians during the campaign, reports revealed that he had met with Ambassador Kislyak. Sessions came under public pressure to recuse himself from any handling of the investigation into Russian interference.

But Trump very much did not want Sessions to recuse himself. So he told McGahn to tell Sessions that. McGahn did so, urging the attorney general to remain in charge of the probe, according to the New York Times. Sessions, however, recused himself anyway.

3) Trump’s firing of James Comey: McGahn and his White House counsel’s office were also involved to some extent in deliberations over firing Comey — for instance, his team researched the legality of the president firing the FBI director beforehand.

4) Trump’s attempt to fire Robert Mueller: Finally, just about a month after Mueller was appointed special counsel, Trump reportedly tried to have him fired — and told Don McGahn to make it happen. But according to the New York Times, McGahn simply did not act on this presidential instruction, and Trump moved on.

Ty Cobb complained that McGahn was stonewalling

A list of questions Mueller wants to ask the president, leaked earlier this year, touches on all four of the above matters, meaning McGahn is an important firsthand witness. He’s also potentially in some criminal jeopardy himself, should he have been involved in obstruction of justice or should he fail to tell investigators the truth about what did happen.

Courts have found that the White House counsel’s interactions with the president are not protected by traditional attorney-client privilege, according to Bob Bauer (a former White House counsel himself).

So McGahn lawyered up, hiring Bill Burck to represent him personally regarding Mueller’s probe. And interestingly, former high-level White House officials Reince Priebus and Steve Bannon — witnesses to many of the same events as McGahn — also hired Burck as their lawyer, suggesting the three men wanted to keep their stories straight rather than risk giving contradictory testimony to the special counsel.

It made sense, then, for Trump to bring in a new attorney to handle the White House response to Mueller’s inquiry — and so in July 2017, he brought in Ty Cobb. Cobb’s preferred strategy was that the White House should hand over a plethora of relevant documents to Mueller and make all relevant White House aides available to be interviewed by the special counsel.

But Cobb found McGahn to be an obstacle. That was made clear when Times reporter Ken Vogel overheard Cobb and Trump’s personal lawyer John Dowd discussing the investigation at a restaurant. Cobb complained that McGahn had “a couple documents locked in a safe” that he wanted to see, and complained that one lawyer on his team was “a McGahn spy.”

But new reports claim that McGahn ended up being very cooperative with Mueller

In the end, however, McGahn did decide to talk to Mueller — quite a bit. In late November 2017, he went for his first lengthy interview with the special counsel’s team. (This was reported at the time, as was the fact that he was expected to be interviewed again.) His staff talked, too — according to a letter from Trump’s lawyers, “eight individuals from the White House Counsel’s office” sat for voluntary interviews with the special counsel.

Then in January 2018, the Times got a major scoop. Reporters Michael Schmidt and Maggie Haberman told the story, for the first time, of Trump’s attempt to fire Mueller the previous June — the instruction McGahn reportedly refused to carry out.

This was the first in a series of leaked accounts that portrayed McGahn not as an obstructive stonewaller (as Cobb had suggested), or the guy doing Trump’s dirty work (as the previously leaked story of McGahn urging Sessions not to recuse himself suggested), but instead as a heroic defender of the Mueller investigation and the rule of law against the president.

This theme was advanced again with another Schmidt and Haberman report this month about how McGahn “cooperated extensively” in Mueller’s investigation. Though the fact that McGahn had sat for at least two lengthy interviews had long been known, the Times upped the number to “at least three” and tallied them at 30 hours in total.

The reporters also said that McGahn had told Mueller of some “episodes” involving Trump that the special counsel “would not have learned of otherwise” — and that McGahn was supposedly motivated, in part, by a fear that Trump was setting him up to take the fall for obstruction of justice.

Schmidt and Haberman then filed a follow-up report stating that their story caused some consternation among Trump’s personal legal team — because they suddenly realized they “do not know just how much” McGahn told Mueller. Vanity Fair’s Gabe Sherman reported that Trump was “rattled” by the Times piece and that his advisers were speculating that McGahn did not “protect” the president. Still, for now, what McGahn truly told Mueller, and how helpful it was helpful to the investigation (or how damaging it was to Trump), remain mysterious.

Now McGahn is leaving under weird circumstances

All the way back in March of this year, Politico reported that McGahn was “eager to exit” the White House and would likely depart by the end of the year. The Associated Press added in May that McGahn had been making “plans to leave for some time.” (McGahn’s rival Ty Cobb was replaced by Emmet Flood, with whom he reportedly has much better relations, around this time.)

However, when Supreme Court Justice Anthony Kennedy announced his retirement in June, McGahn made clear he would stick around to help get Trump’s nominee to fill Kennedy’s seat confirmed by the Senate.

At first glance, then, Axios’s report Wednesday that McGahn “will step down this fall” — either after Brett Kavanaugh’s confirmation or after the midterms — seemed to change little.

But then Trump himself unexpectedly weighed in to make things official, tweeting that McGahn indeed “will be leaving his position in the fall.” The Washington Post reported that McGahn was “surprised” by the tweet and was not expecting it, making it sort of a firing.

Word also leaked out that Ivanka Trump and Jared Kushner were unhappy with McGahn; the Times reported Ivanka was particularly unhappy with revelations in a Times article on McGahn’s cooperation with Mueller. (The president soon denied this via tweet.)

Whatever the case, McGahn’s departure is a milestone. He’s been advising Trump since before the presidential campaign even began, and he’s one of the few remaining top White House staffers who are still in their original roles. Trump owes him a lot. And perhaps Mueller does too.