White House counsel Don McGahn looks on as President Donald Trump speaks during a cabinet meeting in the Cabinet Room of the White House, Wednesday, Oct. 17, 2018, in Washington. (AP Photo/Evan Vucci)

White House counsel Don McGahn looks on as President Donald Trump speaks during a cabinet meeting in the Cabinet Room of the White House, Wednesday, Oct. 17, 2018, in Washington. (AP Photo/Evan Vucci)

WASHINGTON (AP) — Don McGahn has returned to civilian life.

A White House official confirms that Wednesday was McGahn’s last day as White House counsel. The official spoke on condition of anonymity to discuss personnel matters.

President Donald Trump announced in August that McGahn would leave after the confirmation of Brett Kavanaugh to the Supreme Court.

McGahn is a top election lawyer who served as general counsel in Trump’s election campaign. He played a pivotal role in the president’s remaking of the federal judiciary with young, conservative judges, like Kavanaugh. He was also the main point of contact inside the White House for special counsel Robert Mueller’s investigation into Russian meddling in the 2016 election.

In an interview Tuesday with The Associated Press, Trump said Washington lawyer Pat Cipollone would replace McGahn.