US President Donald Trump is hardening his stance against North Korea in an escalating war of words, warning that military solutions are now "locked and loaded" if the country acts "unwisely".

In his latest post on social media on Friday, Trump wrote that he hopes "North Korean leader Kim Jong-un would find another path", after threatening earlier this week to target the US territory of Guam.

It was the latest exchange in a battle of nerves that has prompted fears of a breakout of war in the Korean Peninsula.

Defence officials and military analysts say any new conflict with North Korea would likely escalate to the use of nuclear weapons, bringing catastrophic casualties not seen since World War II.

'Fire and fury'

On Thursday, Trump said that "maybe" his statement to unleash "fire and fury" on North Korea "wasn't tough enough".

He said the communist state had been "getting away with a tragedy that can't be allowed".

"They've been doing this to our country for a long time, for many years, and it's about time that somebody stuck up for the people of this country and for the people of other countries," he warned.

Earlier, North Korea's state media said "only absolute force can work" on Trump.

On Friday, a Chinese state-run media outlet suggested China would "stay neutral" if North Korea attacks first in a conflict with the United States, despite a mutual defence pact with North Korea.

The nationalistic Global Times tabloid said on Friday in an editorial that the US and North Korea were playing a "reckless game" that could lead to "miscalculations and a strategic war".

Al Jazeera's Adrian Brown, reporting from Beijing, said the commentary gave an inkling of China's official stance.

"The editorial also says that if the US carries out attacks and tries to overthrow the North Korean regime, then China would prevent that from happening. But it doesn't specify how Beijing would do that," he said.

"Now, of course, China is the only ally that North Korea has, but China has now agreed to tougher UN sanctions against North Korea, which means it will no longer be importing coal, iron, lead and seafood.

"Now if China does have influence over North Korea, we have yet to really see it."

Political dialogue

China - which has been accused by the US of not doing enough to rein in its longtime ally - has maintained that political dialogue is the only solution.

In Berlin, German Chancellor Angela Merkel rejected a military solution to the North Korean crisis and called for an end to the escalation in language between the US and North Korea.

"An escalation of the language is for me the wrong response," she said on Friday.

"I also don't see a military solution [to the conflict] and do not consider it necessary."

Instead, Merkel called for all sides to the crisis, including the US, South Korea and Japan to work closely together with the UN.