President Trump on Friday called off a planned trip to North Korea by Secretary of State Mike Pompeo, just days before the top diplomat was to arrive in the country for the next round of high-stakes nuclear talks, the first public sign of the president’s festering frustration over the stalled negotiations.

In a surprise announcement on Twitter, Trump declared that he had instructed Pompeo, who was planning his fourth visit to Pyongyang, “not to go to North Korea, at this time,” because there had not been “sufficient progress with respect to the denuclearization of the Korean Peninsula.” The president left the door open for future talks, but he raised the stakes by accusing China of a lack of cooperation on the issue and appearing to tie the matter to the escalating trade war between Washington and Beijing.

“Secretary Pompeo looks forward to going to North Korea in the near future, most likely after our Trading relationship with China is resolved,” Trump wrote.

The Post's Joby Warrick talks you through two of the satellite images that experts say prove North Korea continues to build its nuclear arsenal. (Jason Aldag/The Washington Post)

The president’s tweets marked an abrupt shift in his public posture after he insisted for weeks that progress was being made after his landmark meeting in Singapore with North Korean leader Kim Jong Un in June. Trump has repeatedly hailed that meeting as an unqualified success, declaring that there was “no longer a Nuclear Threat from North Korea” and citing the return of what are thought to be 55 sets of remains of U.S. service members killed in the Korean War. He has decried critics who cited a lack of firm commitments required of North Korea in the Singapore agreement.

Trump has expressed increasing frustration to aides in private, however, and has suggested publicly that getting North Korea to dismantle its nuclear weapons program would take far longer than he had initially expected.

A U.S. official familiar with the talks said Pompeo faced a tough round of negotiations on what would have been his first trip with his newly named North Korea envoy, Stephen Biegun, a former executive at Ford Motor Co. In his last visit to Pyongyang in July, Pompeo came away mostly empty-handed and failed to get a meeting with Kim, which was widely viewed as an embarrassing snub.

Secretary of State Mike Pompeo said Aug. 23 Stephen Biegun would go with him to North Korea "next week." President Trump called off the trip the next day. (Reuters)

U.S. negotiators have struggled in recent weeks over a North Korean demand for the United States to declare an end to the Korean War before the North makes any concessions on denuclearization. U.S. officials have said any declaration would first require additional concessions from North Korea, such as the disclosure of its nuclear arsenal, according to U.S. and Korean diplomats who spoke on the condition of anonymity to describe sensitive discussions.

U.S. intelligence agencies have said Pyongyang is continuing to develop its nuclear and ballistic missile programs in secret, despite announcing publicly that it was dismantling a pair of testing facilities.

“At the most basic level, this is the classic struggle for leverage with North Korea and leverage with China and, of course, the two are deeply interrelated,” said Evan Medeiros, who served as senior Asia director at the National Security Council in the Obama administration. “Trump with this tweet is clearly casting around. The problem is, Beijing and Pyongyang are hip to this game. They will likely see it more as a sign of frustration and vulnerability.”

In his tweets, Trump offered warm words for Kim, saying he looked forward to seeing the young dictator again soon, though a second summit has not been scheduled.

The cancellation is the second time Trump has called off a ­high-level bilateral meeting with North Korea. In May, just weeks before his summit with Kim, Trump abruptly canceled, calling it a “tremendous setback” and warning Pyongyang that the U.S. military would act should the North take any “foolish and reckless” action.

Trump’s action at that time, however, followed a provocative statement from North Korea in which its vice minister of foreign affairs criticized Vice President Pence, calling him a “political dummy.” Days later, Trump recommitted to the meeting.

In his tweets on Friday, Trump said that “because of our much tougher Trading stance with China, I do not believe they are helping with the process of denuclearization as they once were.”

The extent of China’s willingness to help pressure North Korea and how much leverage it actually holds over Pyongyang have long been key questions for U.S. policymakers. Trump initially sought to enlist President Xi Jinping’s help last year during a summit at his Mar-a-Lago resort, suggesting that he was holding off on trade sanctions against China in exchange for its support on North Korea.

But Trump and his aides have complained that Beijing appears to be allowing more cross-border trade with North Korea in recent weeks, and the Trump administration has begun taking a harder policy position with China.

Trump has told advisers that he believes Beijing is trying to punish him politically ahead of the U.S. midterm elections, citing tariffs Beijing enacted on agricultural goods produced in states that he carried in the 2016 election. The president said at one point that he is “totally fed up” with China, according to a senior administration official who spoke to him about it.

Trump also has complained to advisers that previous U.S. presidents did not do enough about China’s trade practices and that he wants to make history and change them, said the official who spoke on the condition of anonymity to discuss private deliberations.

At a recent dinner at his private resort in Bedminster, N.J., Trump complained about Chinese trade practices and listened to complaints from the chief executive of MasterCard, which, along with other U.S. credit card companies, is shut out of China. He sought stories from other attendees about how China was hurting their business.

“He said China wants to make a [trade] deal tomorrow, but it’s not a good deal for our country,” said John Catsimatidis, a New York billionaire who attended the dinner.

But analysts said that Beijing, while alarmed at the increasing hostility with Washington, has successfully leveraged Trump’s North Korea gambit for its own benefit — improving its relations with Pyongyang.

Kim has visited Beijing three times, and South Korean news agencies have reported on rumors that Xi is planning his first trip to Pyongyang.

“China has gotten a lot of what it wants in the changing situation on the Korean Peninsula,” said Bonnie Glaser, a China analyst at the Center for Strategic and International Studies. “What has Trump gotten out of it? A deal in Singapore . . . with no timeline, no road map and really no definition of what denuclearization means.”

Trump’s strategy, analysts said, appears aimed at convincing Xi — under the threat of the ongoing trade war — to use whatever leverage he maintains over Kim to win a significant concession for the United States that could restart denuclearization talks.

But that endeavor is quickly taking on far broader considerations that make a successful outcome even more tricky for Trump. Late Thursday, White House press secretary Sarah Huckabee Sanders issued a sharply worded statement condemning El Salvador’s decision to cut diplomatic relations with Taiwan under pressure from China, which views Taiwan as a part of its territory.

Sanders said El Salvador’s move was of “grave concern” to the Trump administration and warned that the United States would reevaluate relations with its Latin American neighbor. She accused China of seeking to influence countries through “economic dependency” that leads to “domination, not partnership.”

The White House statement “was curious and worrisome because it suggested a U.S. strategy toward China that wants to contain all Chinese trade and investment with countries all over the world,” Medeiros said. “There was a paternalistic and patronizing tone to it.”