Image copyright Reuters Image caption The US president and his North Korean counterpart (R) are at loggerheads over Pyongyang's nuclear programme

US President Donald Trump has told his secretary of state that he is wasting his time trying to negotiate with North Korea over its nuclear programme.

"Save your energy Rex, we'll do what has to be done!" Mr Trump tweeted, after it emerged the US had lines of communication with Pyongyang.

Rex Tillerson disclosed the development on Saturday, saying North Korea had little interest in dialogue.

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

The US wants North Korea to halt its weapons programme, which has seen it perform repeated missile tests, as well as claim to have successfully tested a miniaturised hydrogen bomb which could be loaded on to a long-range missile.

But attempts at dialogue seem to be at odds with President Trump's own attitude to the issue.

On Sunday, he tweeted, in reference to North Korean leader Kim Jong-un: "I told Rex Tillerson, our wonderful Secretary of State, that he is wasting his time trying to negotiate with Little Rocket Man..."

He then added:

He did not elaborate on what he means by "we'll do what has to be done".

However a senior US official, asked for clarification later, told Reuters: "At a time when North Korea is continuing its provocations, the president does not think now is the time to negotiate with them."

The official also said the diplomatic channels were mainly used to discuss American citizens detained by Pyongyang.

'Stay tuned'

It is not the first time Donald Trump has sought to contradict top officials within his administration.

In August, he said the US military was "locked and loaded" ready to deal with North Korea, just hours after his defence secretary tried to cool tensions by saying that diplomatic efforts were succeeding.

His comments come a day after Mr Tillerson revealed that US officials had some communication channels open with Pyongyang, despite the escalating war of words between the leaders of both countries.

Asked whether North Korea would come to the negotiating table, the secretary of state said: "We are probing, so stay tuned."

However, he later acknowledged that little progress had been made.

Mr Tillerson was speaking during a trip to China - the North's biggest trading partner - to meet President President Xi Jinping and other officials.

China just last week told North Korean businesses operating in its territory to close down as part of fresh United Nations sanctions against the reclusive state.