WASHINGTON — Just a day after Secretary of State Rex Tillerson suggested a possible diplomatic breakthrough with nuclear-armed North Korea, President Donald Trump on Sunday undercut his top diplomat, saying Tillerson "is wasting his time."

The stunning rebuke was the latest incident in which Trump publicly has contradicted Tillerson and quickly dashed any hope for progress in easing perilously volatile tensions with the government in Pyongyang, which has threatened to destroy the United States just as Trump has threatened the same against North Korea.

Tillerson, amid a whirlwind series of meetings Saturday in Beijing with China's top leaders, told reporters the United States had opened direct "lines of communication" with North Korea over its aggressive program to build a nuclear arsenal.

"We're not in a dark situation, or blackout," Tillerson said in a news conference at the U.S. Embassy, with Ambassador to China Terry Branstad seated at his side.

"We can talk to them; we do talk to them."

The comments suggested Washington perhaps finally was moving toward accepting the reality of Kim Jong Un having nuclear weaponry and instead attempting to contain him, as many foreign leaders and some former American officials have urged.

But within hours of Tillerson's predawn return to Washington on Sunday, Trump took to Twitter from his weekend retreat at his New Jersey golf club.

"I told Rex Tillerson, our wonderful Secretary of State, that he is wasting his time trying to negotiate with Little Rocket Man," Trump wrote, using a derisive nickname he has created for Kim.

"Save your energy, Rex. We'll do what has to be done!" Trump added, once again injecting a measure of instability into the fraught relations with the isolated, nuclear-armed country — and with his own secretary of state.

Later Sunday, Trump did not let up. "Being nice to Rocket Man hasn't worked in 25 years, why would it work now?" he tweeted. "Clinton failed, Bush failed and Obama failed. I won't fail."

It apparently escaped Trump's attention that Kim Jong Un was 8 years old 25 years ago — though he is the heir in a dynastic ruling family.

While Trump has resorted to bellicose rhetoric with North Korea, Tillerson repeatedly has advocated for diplomacy, with support from Secretary of Defense James N. Mattis. Also, Tillerson and the U.S. ambassador to the United Nations, Nikki Haley, had been making progress in getting international approval for ever-tougher economic sanctions aimed at pressuring Pyongyang by squeezing the country's economy.

Yet that gulf in approach — diplomacy versus military threat — seemed wider than ever after Trump's mockery of his adviser.

In a White House known for chaos and mixed messages, Trump also has clashed repeatedly with other top aides, including Mattis and economic adviser Gary Cohn; on Friday, Health and Human Services Secretary Tom Price was pushed to resign. But belittling the Cabinet member who is traditionally first among equals is remarkable.

Trump has insisted a military operation is a real possibility, but most experts agree war on the Korean peninsula quickly would cost thousands of lives.

The public scolding also raises questions more than ever before about how long Tillerson will remain in office. Already, rumors have been swirling he was pondering resignation from a job he has said he never wanted. The former chief executive of Exxon Mobil has denied he was planning to leave his position, though that was before the weekend kerfuffle.

In a rare moment of candor in July, Tillerson expressed frustration with the bureaucracy of the State Department and diplomacy in general. And in apparent allusion to Trump, he said he missed being the "ultimate decision-maker," as he was as CEO.

Veteran diplomats and foreign policy experts in the United States and elsewhere have been shocked by Trump's blithe belittling of his secretary of state, especially considering its potential to diminish Tillerson's leverage and influence in the world.

Former State Department spokesman R. Nicholas Burns said on Twitter that "undercutting your Secretary of State publicly is a cardinal sin of diplomacy."

"Unpresidential," Burns added.

Michael McFaul, a former U.S. ambassador to Russia, said via Twitter: "I'm hoping this is some clever good cop, bad cop strategy for dealing with North Korea. I fear it's not."

Just as observers wonder at Trump's treatment of Tillerson, many are taken aback by the president's seeming glee at baiting North Korea's Kim, a thin-skinned, isolated leader but one with an increasingly advanced nuclear capability. The president's latest tweets brought new expressions of alarm for suggesting Trump's fundamental lack of understanding of the gravity of the crisis.

Some of that concern came from Trump's own political party.

Sen. Bob Corker of Tennessee, the Republican chairman of the Senate Foreign Relations Committee, said some sort of diplomatic breakthrough was essential. "If we don't ramp up the diplomatic side, it's possible that we end up cornered," Corker said on NBC's "Meet the Press."

Earlier this year, Trump also touched off a large crisis in the Persian Gulf region that put him at odds with Tillerson.

Trump sided with Saudi Arabia against its tiny neighbor Qatar. He accused Qatar of being a major "funder" of terrorism, although far more terrorists have come from Saudi Arabia. He also backed a blockade against the gas-rich emirate, even though it is the site of the region's largest U.S. military base.

Tillerson struggled to defuse those tensions, meeting with and cajoling both the Saudis, who were allied with Egypt, Bahrain and the United Arab Emirates, and the Qataris. He publicly called for an end to the blockade, only to be contradicted less than an hour later by Trump, who insulted Qatar in remarks from the Rose Garden.

Even before Trump's Sunday tweets, administration aides were attempting to tamp down the expectations that Tillerson's comments had generated Saturday. Tillerson's White House-appointed media adviser, R.C. Hammond, said North Korea still has indicated no interest or inclination to hold serious discussions.

"It's not a situation where we are sending smoke signals over the DMZ," Hammond told American reporters in Beijing. "But what it doesn't mean is there is an organized negotiation or there's any sort of larger talks. That is not happening."