Charging ahead with the dramatic remaking of his White House, U.S. President Donald Trump said Thursday he would replace national security adviser H.R. McMaster with the former UN Ambassador John Bolton, a foreign policy hawk entering a White House facing key decisions on Iran and North Korea.

After weeks of speculation about McMaster's future, Trump and the respected three-star general put a positive face on the departure, making no reference to the growing public friction between them. Trump tweeted Thursday that McMaster had done "an outstanding job & will always remain my friend."

He said Bolton will take over April 9 as his third national security adviser in just over a year.

I am pleased to announce that, effective 4/9/18, <a href="https://twitter.com/AmbJohnBolton?ref_src=twsrc%5Etfw">@AmbJohnBolton</a> will be my new National Security Advisor. I am very thankful for the service of General H.R. McMaster who has done an outstanding job & will always remain my friend. There will be an official contact handover on 4/9. —@realDonaldTrump

The national security shakeup comes as the president is increasingly shedding advisers who once eased the Republican establishment's concerns about the foreign policy and political novice in the White House. McMaster is the sixth close adviser or aide to announce a departure in a turbulent six weeks, joining ally Secretary of State Rex Tillerson, who was unceremoniously fired last week.

The White House has said the president is seeking to put new foreign policy leaders in place ahead of not-yet-scheduled meeting with North Korean leader Kim Jung-un. Bolton is likely to add a hardline influence to those talks, as well as deliberations over whether to pull out of the Iran nuclear deal.

The White House said Thursday that McMaster's exit had been under discussion for some time and stressed it was not due to any one incident, including this week's stunning leak about Trump's recent phone call with Russian President Vladimir Putin.

McMaster had briefed Trump before the call — and his team drafted all-caps instructions telling Trump not to congratulate the Russian leader on his re-election victory. Trump did it anyway.

In an interview Thursday night on Fox News, Bolton said he was "outraged" by the leak and whoever's responsible "should be ashamed of themselves."

An internal investigation into the leak is underway, said a White House official who — like others interviewed about the announcement and the White House shakeup — demanded anonymity to discuss internal matters.

In a statement released by the White House, McMaster said he would be requesting retirement from the U.S. Army effective this summer, adding that afterward he "will leave public service."

H.R. McMaster is out as U.S. President Donald Trump's national security adviser, Trump tweeted Thursday evening. (Brendan McDermid/Reuters)

McMaster had told confidants he would leave the post if at any point he lost credibility on the international stage, according to three White House officials. The feverish speculation about an impending exit sped up the decision for him to depart, the officials said, in part because McMaster believed foreign partners were beginning to doubt his influence.

Chief of Staff John Kelly and Defence Secretary Jim Mattis had been pushing Trump to get rid of McMaster and had been escalating their campaign in recent weeks.

McMaster never developed a personal rapport with Trump, who chafed at his long-winded briefing style, according to a White House official and a person close to the president. His influence in high-level decision-making had waned in recent months, as Trump has increasingly relied on the direct counsel of Kelly and Mattis.

Yet officials said the president still has genuine respect for McMaster. He had been under consideration for a fourth star, and White House officials hoped it would provide a graceful exit from the West Wing for the longtime soldier. No suitable postings had been identified, leaving McMaster — long an iconoclast among the top brass — with no choice but retirement.

Divisive foreign policy expert

Bolton, probably the most divisive foreign policy expert ever to serve as UN ambassador, has served as a hawkish voice in Republican foreign policy circles for decades.

He has served in the Republican administrations of Ronald Reagan, George H.W. Bush and George W. Bush, and served as a Bush lawyer during the 2000 Florida recount.

A strong supporter of the Iraq war and an advocate for aggressive use of American power, Bolton was unable to win Senate confirmation after his nomination to the UN post alienated many Democrats and even some Republicans. He resigned after serving 17 months as a Bush "recess appointment," which allowed him to hold the job on a temporary basis without Senate confirmation.

The role of national security adviser does not require Senate confirmation.

Bolton met with Trump and White House Chief of Staff John Kelly in early March to discuss North Korea and Iran. He was spotted entering the West Wing earlier Thursday.

Bolton toyed with running for U.S. president in both the 2012 and 2016.

As national security adviser, Bolton told Fox News he sees his role as ensuring "the president has the full range of options presented" and, once the president makes the decision, serving as a "leading implementer of the decision."

U.S. National Security Adviser H.R. McMaster leaves his office at the end of the day at the White House in Washington, March 16. (Jonathan Ernst/Reuters)

Tension between Trump and McMaster has grown increasingly public. Last month, Trump took issue with McMaster's characterization of Russian meddling in the 2016 election after the national security adviser told the Munich Security Summit that interference was beyond dispute.

"General McMaster forgot to say that the results of the 2016 election were not impacted or changed by the Russians and that the only Collusion was between Russia and Crooked H, the DNC and the Dems," Trump tweeted Feb. 17, alluding to frequent GOP allegations of impropriety by Democrats and Hillary Clinton.

Tillerson's exit also forecast trouble for McMaster, who had aligned himself with the embattled secretary of state in seeking to soften some of Trump's most dramatic foreign policy impulses.

Tillerson was also back in the news briefly Thursday, as he spoke to several hundred workers who gathered at headquarters in Foggy Bottom to watch him depart. He didn't mention his erstwhile boss, nor did he directly address the icy manner in which he was terminated last week after one of the shortest stints by a secretary of state in recent history.

"This can be a very mean-spirited town," Tillerson said, eliciting laughter at first and then applause. "But you don't have to choose to participate in that."

Secretary TIllerson: In closing, I’d like to ask that each of you undertake to ensure one act of kindness each day towards another person…God bless you all. God bless America. <a href="https://t.co/ujepPg7oeF">pic.twitter.com/ujepPg7oeF</a> —@StateDept

McMaster told The New York Times last year that Trump's unorthodox approach "has moved a lot of us out of our comfort zone, me included."

The military strategist, who joined the administration in February 2017, has struggled to navigate a tumultuous White House. Last summer, he was the target of a far-right attack campaign, as conservative groups and a website tied to former Trump adviser Steve Bannon targeted him as insufficiently supportive of Israel and not tough enough on Iran.

McMaster was brought in after Trump's first national security adviser, Michael Flynn, was dismissed after less than a month in office. White House officials said he was ousted because he did not tell top advisers, including Vice President Mike Pence, about the full extent of his contacts with Russian officials. ​

In December 2008, CBC TV's George Stroumboulopoulos interviewed John Bolton: