President Donald Trump met his South Korean counterpart in the White House on Tuesday, publicly acknowledged his planned summit with Kim Jong Un may never take place, and called out China’s ruler for sabotaging the denuclearization process.

It was about time the American leader recognized his North Korea policy was hitting roadblocks.

Just past noon, Trump faced the press with Moon Jae-in, the South Korean president, who flew in from Asia for a meeting that initially was scheduled for only two hours. “This time last week, Moon was coming here with the intention of trying to heavily script what Trump would do in his meeting with Kim,” Victor Cha, senior Asia director for George W. Bush’s National Security Council, told The Washington Post. “Now, he’s coming here just to try to save the summit. The mission has really changed.”

Last week, the North Koreans, who this year gave the impression they had turned over a new leaf, began acting like North Koreans again. They abruptly canceled high-level talks with Seoul, scheduled for last Wednesday, and cast doubt on their willingness to meet with Trump in Singapore on June 12. They cited their displeasure with long-scheduled joint military exercises and with John Bolton, Trump’s new national security adviser.

Moon has since tried to alleviate Kim Jong Un’s concerns, withdrawing, for instance, from the Blue Lightning air-training exercise with the United States and Japan this month. Seoul’s tactics have not worked to mollify the Kim regime, however.

“ I’m a little disappointed. ” — Trump, looking at the outcome of the latest Xi/Kim meeting

Now, analysts want to know what caused the North’s return to the dark side, which took senior Trump officials by complete surprise. But the new hostility should have been anticipated. It was evident that Xi Jinping, whom Trump called a “friend” yesterday, put the North Koreans up to their new bristling posture.

Trump, in his wide-ranging comments made in the Oval Office with Moon at his side, picked on the Chinese for mischief-making. “I will say I’m a little disappointed, because when Kim Jong Un had the meeting with President Xi, in China, the second meeting—the first meeting we knew about—the second meeting—I think there was a little change in attitude from Kim Jong Un,” Trump said. “So I don’t like that. I don’t like that.”

Nor should he. Xi obviously has been up to no good. In addition to openly violating U.N. sanctions in recent months, Xi has undoubtedly been schooling Kim in the art of defiance of the international community, especially the United States. That second Xi-Kim meeting—held May 7 and 8 in the Chinese city of Dalian—preceded North Korea’s return to bad behavior.

“ Xi Jinping has been trying to convince Trump—and Moon—that every plan to denuclearize North Korea runs through the Chinese capital. ”

It took some time for Trump to recognize what was going on, but he evidently lost patience with the Chinese at the beginning of this week. On Monday morning, Trump took to Twitter to criticize Beijing. “China must continue to be strong & tight on the Border of North Korea until a deal is made,” the president warned. “The word is that recently the Border has become much more porous and more has been filtering in.”

The “porous” comment is an understatement. Over the last two months, China’s sanctions enforcement has markedly deteriorated. Moreover, Beijing has ramped up support for the North Korean economy. In the last few weeks, for instance, gas and diesel prices in the northern part of North Korea have fallen dramatically, which could not have happened unless China had been pumping substantially more oil into the North through its pipeline.

Beijing says it wants North Korea to denuclearize, and that may be true, but most of all it does not want to be left out of decision-making affecting the region. “China’s biggest nightmare is North Korea having a closer relationship with the United States and South Korea than it does with China,” prominent China-watcher Bonnie Glaser of the Center for Strategic and International Studies told The Washington Post.

Yes, Xi Jinping has been trying to convince Trump—and Moon—that every plan to denuclearize North Korea runs through the Chinese capital. Xi apparently got Kim to act up to create a need to consult Beijing—how else to explain the sequence of events this month?—but this cynical plan can blow up in Xi’s face.

Trump has, for a year, been publicly saying he is willing to go easy on trade issues with China if Beijing is helpful on North Korea. He repeated this theme Tuesday in his chat with the press.

“When I think of trade with China, I’m also thinking about what they’re doing to help us with peace with North Korea,” Trump said. “That’s a very important element.”

But what happens to Trump’s treatment of Chinese trade issues when he thinks Beijing is not helping? Many have commented that what Treasury Secretary Steve Mnuchin terms the “very comprehensive framework” for a China trade deal looks unsatisfactory. In short, the framework rewards America with little to which it was not already entitled and grants China large rewards, among them sanctions relief for ZTE Corp., the embattled Chinese telecom-equipment maker, and a decision not to impose tariffs under Section 301 of the Trade Act of 1974 for stealing American intellectual property. Many analysts say, based on the 2017 update to the IP Commission Report (PDF), that China’s theft amounts to hundreds of billions of dollars annually.

Some may think the generous Trump position on trade is the price for Beijing’s help to defang the Democratic People’s Republic of Korea. If Trump, however, thinks the Chinese are standing in the way of a NoKo settlement, he could take an especially tough attitude on trade.

Two China crises—one on North Korea and the other on trade—are intersecting, and feeding off each other. They both could escalate fast.