Emmet T. Flood, a White House lawyer who has been helping handle the special-counsel investigation into Russian election interference, has taken over the role of White House counsel on a temporary basis.

White House press secretary Sarah Huckabee Sanders confirmed the move Thursday. Flood assumed the position following the departure Wednesday of Donald McGahn, whose tenure as White House counsel was marked by a significant reshaping of the federal judiciary but also clashes with President Trump over the ongoing special-counsel probe.

Flood will serve in the position until McGahn’s permanent replacement, veteran Washington lawyer Pat Cipollone, comes on board, Sanders said.

“President Trump has a great deal of respect for both individuals and is glad to have them on his team,” Sanders said in a statement.

Weeks ago, after it became clear McGahn would be leaving, Trump considered hiring Flood for the job permanently but ultimately decided to let him focus on his current task related to the investigation of special counsel Robert S. Mueller III.

Trump announced in late August that McGahn would exit after his second Supreme Court nominee, Brett M. Kavanaugh, was confirmed — a process that took slightly longer than initially planned after sexual misconduct allegations roiled the contentious fight over his nomination on Capitol Hill.

Flood spent most of his professional career at the white-shoe Washington firm Williams & Connolly, where he served on the personal legal team of President Bill Clinton during impeachment proceedings.

Flood also represented former Vice President Richard Cheney in a lawsuit filed by former CIA officer Valerie Plame, whose identity was leaked to the media by a Bush administration official.

He left his firm for two years starting in 2007 so he could serve as special counsel to President George W. Bush, where he handled Bush’s response to investigations of his midterm firing of seven U.S. attorneys.

Flood’s appointment in the Trump White House was announced in May. He replaced lawyer Ty Cobb, who had been serving as a point person for the White House’s response to Mueller’s investigation.

Rosalind S. Helderman and Seung Min Kim contributed to this report.