White House Counsel Don McGahn officially left the Trump administration on Wednesday in the latest high-profile departure from the White House.

The New York Times was the first to report that McGahn had made his exit shortly after a farewell chat with President Donald Trump. Just weeks earlier, McGahn had shepherded Supreme Court Justice Brett Kavanaugh through a contentious confirmation battle that involved allegations of sexual misconduct against the judge.

The White House confirmed to HuffPost that McGahn’s last day was Wednesday.

He will be replaced by Pat Cipollone, a Washington lawyer and former Justice Department official the president called a “very fine man” in an interview with The Associated Press this week.

ASSOCIATED PRESS Don McGahn began working as White House counsel in January 2017, shepherding many of Trump's biggest efforts through the bureaucratic process.

McGahn was instrumental in many of the president’s biggest wins during his first two years in office, including the appointment of both Kavanaugh and Neil Gorsuch to the Supreme Court. He also helped Trump appoint dozens of deeply conservative judges to vacant seats on federal courts. The Times noted that McGahn was behind efforts to deter the president from legally questionable decisions, including Trump’s reported attempts to fire special counsel Robert Mueller and force the hand of Attorney General Jeff Sessions.

Yet McGahn may have also proved damaging to the president. He reportedly sat with investigators in Mueller’s office for at least 30 hours, cooperating extensively in their probe to determine if the president had moved to obstruct justice, according to the Times.

Trump tweeted in August that McGahn, who came on as White House counsel in January 2017, would leave the administration, saying he “truly [appreciated] his service.” The attorney, who had worked with Trump since 2015 and previously served on the Federal Election Commission, had long planned to resign in the fall, sources close to McGahn told the Times in August, but Trump’s tweet reportedly came as a surprise to him.

McGahn is the second senior Trump administration official to depart or announce their resignation this month. Nikki Hayley, the U.S. ambassador to the United Nations, said she would step down by the end of the year after informing Trump that she didn’t want to stay on after two years.

There’s speculation that other administration officials, including Sessions and deputy press secretary Raj Shah, will leave after the midterm elections.