President Donald Trump named Mick Mulvaney, director of the Office of Management and Budget, as acting White House chief of staff to replace John Kelly.

Until recently Mulvaney, a former Republican lawmaker from South Carolina, had also served as the acting director of the Consumer Financial Protection Bureau.

Kelly will remain until the end of the year, Trump said in a tweet Friday evening.

The move buys Trump time to complete what has become a chaotic and hasty search to replace Kelly, after the president announced his exit last weekend without a successor in place.

Trump’s first choice -- Vice President Mike Pence’s Chief of Staff Nick Ayers -- turned down the job after Trump announced Kelly’s departure Saturday. As recently as Friday morning, former New Jersey Governor Chris Christie was the frontrunner. Christie withdrew from consideration Friday afternoon.

Mulvaney will take the helm of a West Wing dogged by intensifying questions about the president’s legal and political exposure heading into his 2020 re-election campaign. Just this week, Trump faced a string of setbacks that threatened to once again bring turmoil to his White House.