WASHINGTON (AP) – President Donald Trump is replacing national security adviser H.R. McMaster with John Bolton, a former U.S. ambassador to the United Nations.

gettyimages 935039660 e1521759248253 McMaster Out; Bolton Next National Security Advisor

National Security Advisor H.R. McMaster attends a meeting between President Donald Trump and Crown Prince Mohammed bin Salman of the Kingdom of Saudi Arabia in the Oval Office at the White House on March 20, 2018 in Washington, D.C. (Photo by Kevin Dietsch-Pool/Getty Images)

Trump tweeted that McMaster has done “an outstanding job & will always remain my friend.” He says Bolton will take over April 9.

Trump has repeatedly clashed with McMaster, a respected three-star general, and talk that McMaster would soon leave the administration had picked up in recent weeks.

His departure follows Trump’s dramatic ouster of Secretary of State Rex Tillerson last week.

It also comes after someone at the White House leaked that Trump was urged in briefing documents not to congratulate Russian President Vladimir Putin about his recent re-election win. Trump did it anyway.

McMaster was brought in after Trump’s first national security adviser, Michael Flynn, was dismissed.

gettyimages 923076450 McMaster Out; Bolton Next National Security Advisor

Former U.S. Ambassador to the United Nations John Bolton speaks during CPAC 2018 February 22, 2018 in National Harbor, Maryland. The American Conservative Union hosted its annual Conservative Political Action Conference to discuss conservative agenda. (Photo by Alex Wong/Getty Images)

(© Copyright 2018 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)