Image copyright EPA Image caption Kim Jong-un and Donald Trump are trading insults after the US president's UN speech

Kim Jong-un has said remarks by "deranged" US President Donald Trump have convinced him he is right to develop weapons for North Korea.

In an unprecedented personal statement, Mr Kim said Mr Trump would "pay dearly" for a UN speech where he threatened to "totally destroy" the North if the US was forced to defend itself.

Mr Trump responded that the "madman... will be tested like never before".

The two countries have engaged in ever more heated rhetoric in recent months.

Mr Kim ended his statement by saying he would "surely and definitely tame the mentally deranged US dotard with fire".

China responded to the war of words, warning that the situation was "complicated and sensitive".

"All relevant parties should exercise restraint instead of provoking each other," said Foreign Minister spokesman Lu Kang.

Russia also urged restraint, with Foreign Minister Sergei Lavrov describing the rhetoric between the two leaders as a "kindergarten fight between children".

"We have to calm down the hot heads," he told reporters at the UN on Friday.

North Korea has been testing missiles at an unprecedented rate, and conducted its sixth nuclear test despite international condemnation.

North Korean Foreign Minister Ri Yong-ho, who had earlier compared Mr Trump's speech to "the sound of a barking dog" has warned that Pyongyang could test a hydrogen bomb in the Pacific Ocean in response to the US president's threat.

"It could be the most powerful detonation of an H-bomb in the Pacific," Mr Ri said, quoted by South Korea's Yonhap news agency.

However, he added: "We have no idea about what actions could be taken as it will be ordered by leader Kim Jong-un."

Media playback is unsupported on your device Media caption How could war with North Korea unfold?

Analysis: A test with immense risks

By North Korea analyst Ankit Panda

The prospect of a hydrogen bomb being tested in the Pacific raises a terrifying spectre - one that North Korea-watchers have mulled for some time, but which did not seem realistic until this year.

Kim Jong-un could conduct an atmospheric nuclear detonation in the Pacific Ocean.

This could mean mounting the nuclear device he showed the world before his 3 September nuclear test and firing it over Japan into the Pacific Ocean, demonstrating a credible thermonuclear capability.

Presumably, witnessing this feat would "tame" Trump into accepting the "equilibrium" that North Korea alluded to earlier this week - a state of stable nuclear deterrence.

Given the inadequacy of existing US and Japanese ballistic missile defence systems, it is far from a sure thing that such a test could be intercepted.

The risks are immense. Civil aviators and mariners in the target area may perish, given that North Korea does not offer international warning of its missile launch plans - unlike other states that routinely test ballistic missiles.

The environmental damage and fallout could be catastrophic. Moreover, should the missile fail over Japan - or prematurely detonate - the consequences would effectively guarantee a nuclear war in retaliation.

What would a nuclear test in the Pacific mean?

Mr Kim said in an English statement carried by state news agency KCNA that Mr Trump's remarks "have convinced me, rather than frightening or stopping me, that the path I chose is correct and that it is the one I have to follow to the last".

He said "now that Trump has denied the existence of and insulted me and my country in front of the eyes of the world and made the most ferocious declaration of a war in history", North Korea would consider the "highest level of hard-line countermeasure" to make Mr Trump "pay dearly for his speech".

Image copyright Reuters Image caption The Pacific island of Guam is home to the US Air Force's Andersen air base

Experts say this is the first time a North Korean leader has made a direct address to an international audience.

The statement came shortly after the country's delegation arrived in New York for the UN General Assembly. Analysts say that for this reason it merits serious and thorough consideration.

Hours later, Mr Trump responded in a tweet: "Kim Jong Un of North Korea, who is obviously a madman who doesn't mind starving or killing his people, will be tested like never before!"

In an interview with news network ABC on Friday, US Secretary of State Rex Tillerson took a more measured approach.

"We are quite challenged but our diplomatic efforts continue unabated," he said, adding that the "strongest economic sanctions ever" placed against the country were still being tested.

Media playback is unsupported on your device Media caption Trump: 'Rocket Man's suicide mission'

Earlier, Mr Kim's comments had prompted swift criticism from the Japanese government.

Chief Cabinet Secretary Yoshihide Suga said in a news conference on Friday: "North Korea's remarks and behaviour are provocative to regional and international security, and they are absolutely unacceptable."

North Korea has fired two ballistic missiles over Japan in the past month, raising regional tensions even further.

Mr Trump on Thursday signed a new order boosting sanctions against North Korea, where the US treasury would target firms and financial institutions doing business with Pyongyang.

He said: "For much too long North Korea has been allowed to abuse the international financial system to facilitate funding for its nuclear weapons and missile programs."

The UN Security Council had approved new rounds of sanctions earlier this month aimed at starving North Korea of fuel and income, which were in response to Pyongyang's much-condemned sixth nuclear test on 3 September.