Media playback is unsupported on your device Media caption President Trump threatened a response 'like the world has never seen'

At a time when nuclear war with North Korea seems a possible - if distant - threat, you'd think everyone would want the US administration to be on the same page.

But in recent weeks, statements from President Trump and his top officials appear to directly contradict each other.

President Trump's outburst on Friday - that the US military was "locked and loaded" ready to deal with North Korea - came just hours after his Defence Secretary James Mattis attempted to cool tensions by saying that diplomatic efforts were succeeding.

Here are some of the other mixed messages we've heard since North Korea's second intercontinental ballistic missile (ICBM) test on 28 July.

Military action

What Trump said:

President Trump was pleased when the UN agreed new sanctions against Pyongyang. But he has also stressed the military option was open.

On Tuesday, he boasted about America's military might and warned of "fire and fury" if North Korea threatened the US.

Then, after North Korea said it was preparing missile strikes on the US island territory of Guam, he took it up a notch again - saying the regime of Kim Jong-un should be "very, very nervous". He said the regime would be in trouble "like few nations have ever been" if they did not "get their act together".

What other officials said:

Despite Mr Trump's tweets, many in his team have played down the prospect of war.

Shortly after Mr Trump's comments on Guam, Gen Mattis cautioned that armed conflict would be "catastrophic" and insisted diplomacy was bearing fruit.

"The American effort is diplomatically led, it has diplomatic traction, it is gaining diplomatic results," Gen Mattis said.

Media playback is unsupported on your device Media caption Mattis: "The tragedy of war is known... it would be catastrophic"

US Secretary of State Rex Tillerson has also told reporters: "I think the president's made it clear he prefers a diplomatic solution."

He argued that Mr Trump's words were designed to encourage dialogue with Pyongyang "by ensuring North Korea understands what the stakes are".

Mr Tillerson has previously stressed the importance of sanctions - warning that any nation that provided economic or military benefits to the North was "aiding and abetting a dangerous regime".

Blaming China

What Trump said:

President Trump has praised China in the past, saying it is "trying hard" to rein in North Korea.

However, in recent months, he has repeatedly criticised Beijing for continuing to trade with Pyongyang.

"So much for China working with us," the US president tweeted the day after North Korea claimed to have tested its long-range missile.

At the end of July, he again said he was "very disappointed" with China for not doing enough to stop North Korea's weapons programme.

"They do NOTHING for us with North Korea, just talk," he wrote on Twitter.

What others said:

Back in June, Gen Mattis had praised Beijing's efforts to restrain North Korea's missile and nuclear activity.

And on 2 August, Mr Tillerson said: "We certainly don't blame the Chinese for the situation in North Korea."

Anything to worry about?

What Trump said:

The president has ratcheted up his rhetoric, warning that if North Korea attacks Guam it should expect "big, big trouble".

"If he [Kim Jong-un] utters one threat in the form of an overt threat... with respect to Guam or anyplace else that's an American territory or an American ally he will truly regret it and he will regret it fast."

However, he has also struck an optimistic tone, saying: "Hopefully, it will all work out... nobody loves a peaceful solution better than President Trump."

What others said:

Secretary Tillerson has sought to assure Americans there is no imminent threat, despite some of the strong words from his boss.

On Wednesday, he said the situation had not changed dramatically in recent days and that Americans "should sleep well at night".

Media playback is unsupported on your device Media caption Don't listen to Tillerson - White House

However, top Trump aide Sebastian Gorka told BBC News that Mr Tillerson was not actually speaking for the White House.

"You should listen to the president," Mr Gorka said. "The idea that Secretary Tillerson is going to discuss military matters is simply nonsensical.

"It is the job of Secretary Mattis to talk about military options."

Seeking regime change

Sometimes Mr Trump's officials appear to disagree with each other too.

Mr Tillerson struck a conciliatory tone after Pyongyang tested a second ICBM in July and claimed it could hit the US west coast.

"We do not seek a regime change, we do not seek the collapse of the regime," he said. "We're not your enemy."

Media playback is unsupported on your device Media caption Rex Tillerson: We don't seek regime change in North Korea

However, just days later Gen Mattis warned North Korea that its actions could usher in the "end of its regime and the destruction of its people".

The Pentagon chief also said Pyongyang would be "grossly overmatched" in a war against the US and its allies.