Image copyright AFP/Getty Images Image caption John Bolton is to be Mr Trump's third national security adviser

President Donald Trump is replacing US National Security Adviser HR McMaster with Bush-era defence hawk and former United Nations ambassador John Bolton.

Mr Trump tweeted to thank Gen McMaster, saying he had done an "outstanding job & will always remain my friend".

Mr Bolton, who has backed attacking North Korea and Iran, told Fox News his job would be to ensure the president has "the full range of options".

He becomes Mr Trump's third national security chief in 14 months.

Gen McMaster is the latest high-profile departure from the White House.

Last week, Mr Trump fired Secretary of State Rex Tillerson by a tweet, replacing him with former CIA Director Mike Pompeo.

Mr Bolton's appointment does not require US Senate confirmation. He will take the job on 9 April.

The National Security Adviser is the key counsellor to the president on national security and foreign policy issues, and acts as a conduit for policy proposals coming from various government departments, including defence and state.

Responding to the move, Mr Bolton said he was looking forward to working with President Trump and his team "to make our country safer at home and stronger abroad".

Who is John Bolton?

Mr Bolton, 69, has been a foreign policy hawk in Republican circles for decades, having served in the administrations of Ronald Reagan, George HW Bush and George W Bush.

The second Bush appointed him as US envoy to the UN, during which time diplomats privately criticised Mr Bolton's style as abrasive.

A strident neo-conservative, Mr Bolton helped build the case that Saddam Hussein possessed weapons of mass destruction, which turned out to be wrong.

Known for his walrus moustache, Mr Bolton does not appear to have greatly moderated his views since his last spell in government.

He stands by the invasion of Iraq and has advocated in newspaper op-eds using military force against North Korea and Iran.

Media playback is unsupported on your device Media caption US National Security Adviser HR McMaster is the latest victim of the President's line up changes.

A hawk's hawk

Analysis by BBC North America reporter Anthony Zurcher

Earlier this month, Donald Trump tweeted: "I still have some people that I want to change". He wasn't kidding.

Since then chief economic adviser Gary Cohn, Secretary of State Rex Tillerson, personal lawyer John Dowd and now National Security Adviser HR McMaster have headed to (or been shown) the exits.

One explanation is that the president feels more comfortable in his job - and more willing to challenge the advice given him by his closest aides.

He has chafed at the perception that he is being "handled" by those around him, and is installing men who agree to action, instead of preaching caution.

When it comes to Iran, Mr Bolton and the president are on the same page. Coupled with Mr Tillerson's exit, the US is heading toward a much more confrontational relationship with the Islamic Republic.

In other ways, however, the former UN ambassador is an unusual choice.

Mr Trump frequently has called the Iraq war a colossal mistake - the same war that Mr Bolton enthusiastically promoted during his time in the George W Bush administration.

Candidate Trump regularly espoused non-interventionism. Mr Bolton is a hawk's hawk.

Now that hawk has a perch in the Oval Office.

Media playback is unsupported on your device Media caption Trump's unprecedented staff turnover rate

What has the reaction been?

In the US

Republican Senator Lindsay Graham described the appointment as "good news for America's allies and bad news for America's enemies"

Democrat Senator Chris Coons said Mr Bolton's stance on Iran and North Korea was "overly aggressive at best and downright dangerous at worst".

Abraham Denmark, a senior defence official in the Obama administration, said: "Bolton has long been an advocate for pre-emptive military action against North Korea, and his appointment as national security adviser is a strong signal that President Trump remains open to these options"

Globally

Iran's Guardian Council called Mr Bolton a "supporter of terrorists", focusing on past statements of support for the Mujahideen-e Khalq (MEK), an exiled opposition group that backs the overthrow of the Islamic Republic

North Korea has yet to react but the government there once called John Bolton "human scum"

"This is worrisome news," the head of the national defence committee of South Korea's parliament told Reuters news agency, expressing fears that US-North Korea talks could be scuppered

Why is Trump replacing McMaster?

In a brief statement on Thursday, Gen McMaster thanked President Trump for appointing him and said he was applying to retire from the US Army later this year.

The 55-year-old three-star general is leaving after just over a year as national security adviser. The president had reportedly found Gen McMaster's briefings to be grating. He was also described as aggressive and prone to lecture.

The White House said Mr Trump and Gen McMaster had "mutually agreed" that he would leave. He had been rumoured for weeks to be on his way out.

Image copyright AFP Image caption HR McMaster's briefings reportedly grated on the president

Gen McMaster's departure came a day after it was leaked that Mr Trump was advised this week in briefing documents not to congratulate Russian President Vladimir Putin on his recent re-election, but did it anyway.

Gen McMaster replaced Lt Gen Michael Flynn, who was fired after less than a month in the job for misleading the White House about his contacts with the Russian ambassador.