President Trump, not for the first time, publicly contradicted his chief diplomat on a major foreign policy issue Sunday, saying via Twitter that Secretary of State Rex Tillerson was “wasting his time trying to negotiate with Little Rocket Man.”

Using his nickname for North Korea’s leader, Kim Jong Un, and apparently warning again of a U.S. military response to its escalating nuclear threat, Trump advised, “Save your energy, Rex, we’ll do what has to be done.”

The tweets came the day after Tillerson, on a visit to Beijing, told reporters the administration had direct lines of communication with North Korea and was probing for a response. “We ask, ‘Would you like to talk?’” he said. “We can talk to them, we do talk to them.”

The latest display of dissension follows earlier presidential put-downs and efforts by Tillerson and other national security officials to smooth Trump’s rough edges on issues as diverse as U.S. policy toward NATO, Mexico and the Persian Gulf.

All have sparked questions about Tillerson’s longevity in office, with repeated speculation that he is fed up, or that Trump wants him gone.

“Humiliating for Tillerson, but worse, renders him useless. He’ll resign, today or after a brief face-saving interval,” predicted former Obama administration ambassador and National Security Council official Dan Shapiro, one of many foreign policy experts who tweeted about Trump’s Sunday comments, sent from his New Jersey golf club.

“President Trump spectacularly shot down SecState Tillerson after important Beijing talks. How long can this last?” asked Carl Bildt, former conservative prime minister of Sweden and current co-chair of the European Council on Foreign Relations.

Neither the State Department nor the White House responded to queries on Trump’s comments.

Tillerson’s aides were quick to explain on Saturday that the secretary’s remarks, made during a brief visit to China to plan for Trump’s trip there in November, did not imply that any substantive talks were underway with Pyongyang.

“That’s not happening,” senior Tillerson adviser R.C. Hammond told reporters aboard the secretary’s flight from Beijing. “There is a means by which the countries can engage with each other,” Hammond said, adding, “North Korean officials show no indication that they are interested in or ready for talks on denuclearization.”

In Washington, a senior administration official said immediately after the secretary’s comments, “I wouldn’t read too much into that.”

Sen. Bob Corker (R-Tenn.), chairman of the Senate Foreign Relations Committee, warned Sunday that “if we don’t ramp up the diplomatic side . . . it’s possible that we end up cornered.”

“I think there’s more going on than meets the eye,” Corker said on NBC’s “Meet the Press.” While the Trump administration and the United Nations have rapidly increased sanctions against Pyongyang, he said, “I think Tillerson understands that every intelligence agency we have says there’s no amount of economic pressure you can put on North Korea to get them to stop this program because they view this as their survival. . . . We’re moving to a place where we’re going to end up with a binary choice soon.”

Shortly after Corker’s appearance, Trump tweeted again. “Being nice to Rocket Man hasn’t worked in 25 years, why would it work now? Clinton failed, Bush failed, and Obama failed. I won’t fail.”

Kim, who was preceded by his father and grandfather, has been in power since late 2011.

Tillerson, a former ExxonMobil chief executive with no previous diplomatic experience, has been under a broader cloud in office, with lawmakers and others criticizing the slow pace of diplomatic appointments, his acquiescence to massive budget cuts proposed by the White House, and the State Department’s lack of visibility on a number of issues.

Deputy Secretary of State John J. Sullivan acknowledged at a House Foreign Affairs Committee hearing last week that department morale was low.

On the world stage, where Tillerson has sought to reassure allies that the United States under Trump is a reliable partner, many have concluded that his influence is limited.

With White House aides such as presidential son-in-law Jared Kushner and others given a major role in foreign policy, the question of “who is responsible for what segment” of national security remains an open one, said a senior official in the government of a close European ally, speaking on the condition of anonymity to talk about sensitive diplomatic issues. Unpredictability “may be a useful tool with adversaries,” he said, but with allies it creates “uncertainty and irritation.”

Tillerson defended Trump’s early August threat to rain “fire and fury” on North Korea as “important . . . to avoid any miscalculation on their part.” But he quickly followed with reassurance that Trump was “just reaffirming . . . that the United States has the capability to fully defend itself from any attack, and our allies, and we will do so. So the American people should sleep well at night.”

Jim Mattis, the retired Marine general who is Trump’s secretary of defense, has often joined ­Tillerson in advocating for ­diplomacy over military saber-rattling. But Mattis, a Trump favorite among the retired and active-duty military advisers around the president, has been spared the belittling comments and tweets that Tillerson has endured along with Attorney General Jeff Sessions and others.

Early in the administration, Tillerson and Mattis, as well as Vice President Pence, traveled to NATO headquarters to express unwavering U.S. support for the alliance that Trump, during his campaign, had called “obsolete.”

In late February, as Tillerson was visiting Mexico, Trump told a business forum in Washington that he would launch a “military operation” at the U.S.-Mexico border to remove “gang lords . . . drug lords” and other “bad dudes out of this country at a rate that nobody’s ever seen before.”

At a news conference the same day with his Mexican counterpart, Tillerson chose to take the high road. “In a relationship filled with vibrant colors,” he said, “two strong sovereign countries will have their differences.”

Perhaps the sharpest dissonance occurred in June, when Tillerson publicly called on a ­Saudi Arabia-led bloc of Arab nations to immediately cease their blockade of neighboring Qatar, which they had accused of terrorism financing, and he urged “calm and thoughtful dialogue.” Barely an hour later, Trump called the blockade “hard but necessary” and said he agreed with the Saudi accusations.

Members of his staff have sometimes risen to Tillerson’s defense. When a White House aide this summer publicly chastised the secretary for meddling in “military matters” on North Korea for his “sleep well” comment, State Department spokeswoman Heather Nauert bristled. “He’s a Cabinet secretary,” she said. “He’s fourth in line to the presidency. He carries a big stick.”

Tillerson himself has largely refused to talk about any frustration he may feel toward Trump. “There is no gap between the president and myself or the State Department on policy,” he told Congress in late June. “There are differences in terms of how the president chooses to articulate elements of that policy.”

More recently, following August’s neo-Nazi violence in Charlottesville, Tillerson was asked on “Fox News Sunday” about the values of a president who said “many sides” were to blame.