Updated at 3:41 p.m.

White House counsel Donald McGahn plans to step down this fall, President Donald Trump said Wednesday in a tweet. The departure of his top lawyer would come “shortly after the confirmation (hopefully)” of Judge Brett Kavanaugh to the U.S. Supreme Court.

“I have worked with Don for a long time and truly appreciate his service!” Trump tweeted.

A former Jones Day partner who served as the Trump presidential campaign's top lawyer, McGahn spearheaded the administration's aggressive push to fill the courts with young, conservative jurists. McGahn found stunning success in that quest, working with Senate Republicans to install dozens of judges on federal district courts and appeals courts—and confirm Justice Neil Gorsuch to the Supreme Court.

“The president really looks for folks who, not surprisingly, have demonstrated the ability to stand strong, as he has his whole life,” McGahn said at the Conservative Political Action Conference in February. “He looks for folks he can relate to that way.”

Kavanaugh's confirmation hearing is scheduled to start next Tuesday and will last at least several days. Senate Republicans are hopeful Kavanaugh is sitting on the Supreme Court at the start of the term in early October.

McGahn's departure has long been discussed openly in media reports, and so the timing is not a surprise. Still, Trump's confirmation of the departure plans comes after revelations that McGahn spoke for some 30 hours with the special counsel, Robert Mueller III, who is leading the investigation of Russia's interference in the 2016 presidential election. The New York Times reported that McGahn cooperated extensively with Mueller's team, perhaps more than the White House was aware.

Trump on Wednesday told reporters that McGahn is “a really good guy,” and that he has “a lot of affection for Don.” Asked whether he had any concern about McGahn's cooperation with Mueller, Trump said no. He reiterated an earlier contention that he approved McGahn's cooperation. Trump said McGahn is likely headed to the private sector.

Emmet Flood, a former Williams & Connolly partner who left the firm to join Trump's legal team in May, is seen as the leading candidate to replace McGahn.

Flood, who is currently focused on Trump's dealings with the special counsel's office, represented former President Bill Clinton during his impeachment proceedings. His ascension to the top legal role in the White House could coincide, roughly, with Democrats taking a majority in the House and pursuing impeachment proceedings against Trump.

Several other White House lawyers who were with the Trump administration from the start have left for other posts or are planning to leave.

Those lawyers include Greg Katsas, a former Jones Day partner who was confirmed to the U.S. Court of Appeals for the D.C. Circuit; Uttam Dhillon, now serving as the acting head of the Drug Enforcement Administration; and Stefan Passantino, who formerly led the political law practice at Dentons. Passantino is reportedly planning to leave by the end of the summer.

Read more: