McMaster had briefed Trump before the Putin 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.



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."



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 Defense Secretary Jim Mattis had been pushing Trump to get rid of McMaster and had been escalating their campaign in recent weeks. It had appeared McMaster's departure was imminent last week — but White House officials insisted the speculation was false.



"Just spoke to @POTUS and Gen. H.R. McMaster — contrary to reports they have a good working relationship and there are no changes at the NSC," White House press secretary Sarah Huckabee Sanders tweeted late last Thursday night.



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.



Bolton, probably the most divisive foreign policy expert ever to serve as U.N. ambassador, has been a force 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 U.N. 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 Kelly in early March to discuss North Korea and Iran. He was spotted entering the West Wing earlier Thursday.



Tension between Trump and McMaster had 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.



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.



Associated Press writer Jill Colvin contributed to this report.