North Korean leader Kim Jong-un has called US President Donald Trump "mentally deranged" and said he would "pay dearly" for the recent threats against his country.

In a rare statement directly attributed to the North's leader, Kim said on Friday that Trump is "unfit to hold the prerogative of supreme command of a country", describing the president as "a rogue and a gangster fond of playing with fire".

Hours later, North Korea's foreign minister reportedly said his country might be planning to test a hydrogen bomb in the Pacific Ocean to fulfil Kim's vow to take the "highest-level" action against the United States.

Kim's statement was carried by the North's official Korean Central News Agency. It responded to Trump's combative speech at the UN General Assembly on Tuesday.

READ MORE: Ri Yong-ho calls Donald Trump threat a 'dog's bark'

Trump warned Pyongyang that Washington would "totally destroy" North Korea if the US or its allies were attacked. He also mocked Kim as "rocket man" and said he was on a "suicide mission".

North Korea says it needs a sturdy nuclear deterrent to protect it from an aggressive US, and the autocratic regime has made militarism a central part of its national ideology.

The country'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 the September test of what it said was a miniaturised hydrogen bomb capable of being loaded onto a rocket.

Kim characterised Trump's speech to the world body 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".

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. It will further escalate the war of words between the adversaries.

"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 North's Foreign Minister Ri Yong-ho told reporters in New York in front of his hotel room that Pyongyang's response "could be the most powerful detonation of an H-bomb in the Pacific".

South Korea's Yonhap news agency reported Ri added: "We have no idea about what actions could be taken as it will be ordered by leader Kim Jong-un."