Washington (AFP) - US President Donald Trump on Thursday named hardline Fox News pundit and former UN ambassador John Bolton as his new national security advisor, ousting embattled army general HR McMaster.

Trump took to Twitter to announce the latest in a cascade of staff changes, one which calls the future of a landmark deal to curb Iran's nuclear program into serious doubt.

"I am pleased to announce that, effective 4/9/18, @AmbJohnBolton will be my new National Security Advisor," Trump said.

The announcement came just days after he moved to replace secretary of state Rex Tillerson with another Iran hawk, CIA director Mike Pompeo.

"I am very thankful for the service of General H.R. McMaster who has done an outstanding job & will always remain my friend," Trump tweeted.

McMaster had been expected to leave later this year, so his exit was no surprise. But Bolton's nomination has stunned much of Washington.

A vocal advocate of the Iraq war, he has also championed pre-emptive strikes against North Korea and regime change in Iran -- making him an outlier even among Republicans.

His appointment had been fiercely opposed by many within Trump's inner circle, most notably the coterie of military officers who have experienced the brutality of war first hand.

Bolton -- a veteran of the George W. Bush administration -- will now have a central role in crafting US foreign policy, refereeing debates between America's spooks, soldiers and diplomats.

But his most potent role will be framing the security decisions that make it to Trump's desk.

His ideological approach to American power matches neatly with Trump's tough-talking rhetoric, although the two have not always agreed on overseas wars.

One Republican operative, speaking on condition of anonymity, admitted to some concerns about the appointment.

"Some folks think he's a little too hawkish," the source said.

"But people who have worked with him think he's a pro and will step into the job knowing the key players, processes and issues."

Story continues

For his part, Bolton tried to ease fears he would steer Trump by the nose and down the path of war.

"I have my views. I'm sure I'll have a chance to articulate them to the president," he told Fox News.

"If the government can't have a free interchange of ideas among the president's advisers, I think the president is not well-served."

Unlike the secretaries of state or defense, the national security advisor works directly for the president and does not need to be confirmed by the Senate in order to take up his post.

- Fork in the road -

McMaster's exit is the latest in a string of high-profiledepartures from the White House that started with national security advisor Michael Flynn and has also included chief of staff Reince Priebus, chief strategist Steve Bannon, economic advisor Gary Cohn and Tillerson.

McMaster, a three-star army general, had been expected to move out of the White House and into a four-star position.

Instead, he will retire from public life.

"After thirty-four years of service to our nation, I am requesting retirement from the US Army effective this summer after which I will leave public service," he said in a statement.

"Throughout my career it has been my greatest privilege to serve alongside extraordinary service members and dedicated civilians."

McMaster had been brought in to replace Flynn, Trump's first national security advisor, who has since admitted to lying to the special counsel Robert Mueller and has turned state's witness.

Bolton's appointment brought sharply different reactions, which in public cut along predictable party lines.

Democratic Senator Edward Markey described the appointment as "a grave danger to the American people and a clear message from President Trump that he is gearing up for military conflict."

Congressman Lee Zeldin, a Trump loyalist, applauded the appointment and described Bolton as "ridiculously knowledgeable."

"Leaks from NSC will end. Obama holdovers will be gone & team, chemistry & work product will all get ramped up. Very underrated, amazing American. Extraordinarily talented pick," he tweeted.

The Eurasia Group, a risk consultancy, said Bolton's appointment makes US foreign policy "America First on Steroids."

"This very hardline, strident figure will stoke President Donald Trump’s hardest-line instincts. Bolton will want to implement very tough policies, and limit Trump's use of them as negotiating tactics," it said.

Bolton, it added, is "the hawk's hawk."