North Korea says it may test a hydrogen bomb over the Pacific Ocean after US President Donald Trump threatened to destroy the country, whose leader responded by promising to make a "mentally deranged" Trump pay dearly for his threats.

Speaking in New York City on Friday, Ri Yong-ho, North Korea's foreign minister, said his country could consider a hydrogen bomb test on an unprecedented scale on the Pacific Ocean, South Korea's Yonhap news agency reported.

Japan, the only country ever to suffer an atomic attack, described the threat from Ri as "totally unacceptable".

EXPLAINER: Hydrogen bomb v atomic bomb - What's the difference?

For its part, China responded by calling on all parties to exercise restraint.

On Tuesday, Trump said in his first address to the UN that he would "totally destroy" North Korea if it threatened the US and its allies, and called Kim a "rocket man" on a "suicide mission".

In a rare statement directly attributed to the North's leader, Kim Jong-un has said Trump is "unfit to hold the prerogative of supreme command of a country".

He described Trump as "a rogue and a gangster fond of playing with fire".

North Korea, a country of 26 million people, says it needs a strong nuclear deterrent to protect it from the US, and its government has made militarism a central part of its national ideology.

Pyongyang's stated aim is to be able to target the US mainland, and it has shown off advances in its nuclear weapons programme in recent weeks, with a September test of what it said was a miniaturised hydrogen bomb capable of being loaded onto a rocket.

Kim characterised Trump's speech at the UN General Assembly as "mentally deranged behaviour" and "the most ferocious declaration of a war in history".

He said 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".

'Insulted me and my country'

Kim said he is "thinking hard" about his response and that Trump "will face results beyond his expectation".

It is unusual for the North Korean leader to issue such a statement in his own name.

"Now that Trump has … insulted me and my country in front of the eyes of the world, we will consider with seriousness exercising of a corresponding, highest level of hard-line countermeasure in history," Kim said.

The US and South Korea are technically still at war with North Korea because the 1950-53 Korean conflict ended with a truce and not a peace treaty.

North Korea accuses the US, which has 28,500 troops in South Korea, of planning to invade and regularly threatens to destroy it and its Asian allies.

On Thursday Trump announced his administration's latest steps to punish foreign companies that deal with North Korea.

In response, Lu Kang, Chinese foreign ministry spokesperson, said in Beijing that China opposes unilateral sanctions outside the UN framework.

Al Jazeera's Adrian Brown, reporting from Beijing on Friday, said: "I don't think the sanctions [against North Korea] really came as a big surprise. Back in June, the US blacklisted the Bank of Dandong, a relatively small bank that operates in northeast China and has about a hundred branches.

"The US treasury officials said they have evidence that this bank was facilitating transactions with officials dealing with North Korea's missile and nuclear programmes. They also blacklisted a Chinese shipping company, so I think [the Chinese] know what to expect."

INFOGRAPHIC: North Korea - All you need to know explained in graphics

"What I think has happened behind the scenes is that US officials have got China in a headlock: Look, unless you rein in these small financial institutions who are enabling business with the North, we will target and blacklist one of your big banks, so that they can't operate in the US financial system.

"China has four of the world's biggest banks, and I think the leadership want to avoid a situation where one of its banks could not operate in the world's largest economy."

Against this backdrop of regional tensions, North Korea has also accused China's ruling Communist Party media outlets of "going under the armpit of the US" by criticising Pyongyang's weapons programme.

READ MORE: North Korea's nuclear weapons - Here is what you need to know

A commentary from the North's official Korean Central News Agency on Friday accused the party newspaper People's Daily and other party news outlets of "kowtowing to the ignorant acts of the Trump Administration".

It mentioned, among a string of examples, how People's Daily had said North Korea's weapons programme was "a noose put around its own neck."

"In that garbled rhetoric, there was one unmistakable message," Al Jazeera's Brown said, "and it was this: China and North Korea are no longer as close as they were.

"It's becoming abundantly clear that China cannot resolve this crisis on its own as it has run out of options."