Donald Trump has developed a well-earned reputation for rhetorical excess. But in the case of North Korea, most, if not all, of his rhetoric is deployed in service to a policy that makes sense. Even if it is unlikely to resolve one of the world’s most intractable problems, it is worth trying.

Trump has calculated that the answer to the growing North Korean threat lies in Beijing. “China is very much the economic lifeline to North Korea so, while nothing is easy, if they want to solve the North Korean problem, they will,” he tweeted on April 21.

This helps to explain his rhetoric, alternatively soothing and alarming. “There is a chance that we could end up having a major, major conflict with North Korea. Absolutely,” Trump told Reuters last week in an attempt to ratchet up the pressure primarily on China, rather than North Korea. The redeployment of the USS Carl Vinson carrier strike group to the region is part of the same strategy. Trump knows that China doesn’t want a war on its border.

But Trump is also offering China’s President, Xi Jinping, sweeteners to go along with threats to launch Korean War II. In his Reuters interview, he was positively fawning in his description of the Communist dictator, whom he has met once: “He is a good man. He is a very good man, and I got to know him very well. With that being said, he loves China, and he loves the people of China.”

It is safe to say that Xi Jinping does not actually love all the people of China. He has no love left, in particular, for those who challenge his rule. As Amnesty International noted in its 2016/2017 report: “Activists and human rights defenders continued to be systematically subjected to monitoring, harassment, intimidation, arrest and detention.” It makes sense that Trump would say this, not only because he has shown scant concern for human rights but also because he thinks that this buddy act is the way to win Xi’s cooperation on North Korea.

That also explains why Trump refuses to renew his contacts with the president of Taiwan after a phone call in December that aggravated Beijing. “My problem is that I have established a very good personal relationship with President Xi,” he told Reuters. “I really feel that he is doing everything in his power to help us with a big situation. So I wouldn’t want to be causing difficulty right now for him.”

From a certain perspective, it can look as if Trump were giving Beijing a veto over U.S. policy toward Taiwan. In his mind, however, he is no doubt holding out another inducement for Xi, suggesting that if China cooperates on North Korea, the U.S. will tone down its support for Taiwan.

Trump’s offer to talk with Kim Jong-un, one of the world’s worst dictators, is yet another attempt to signal flexibility, even if was delivered with trademark hyperbole. He called Kim a “smart cookie” and said, “If it would be appropriate for me to meet with him I would absolutely. I would be honored to do it.”

The only thing that Trump said in the Reuters interview that doesn’t fit the script is his criticism of South Korea. As Reuters noted, he said that “he wants South Korea to pay the cost of the U.S. THAAD anti-missile defense system, which he estimated at $1 billion, and intends to renegotiate or terminate a U.S. free trade pact with South Korea because of a deep trade deficit with Seoul.”

Both issues are non-starters in Seoul, where there is a lot of satisfaction with the U.S.-South Korea Free Trade Agreement and a lot of grumbling about the U.S. THAAD ballistic missile defense system deployment, which has angered China. Moon Jae-in, the frontrunner in the May 9 South Korean presidential election, has already expressed opposition to the accelerated deployment of THAAD. Trump’s demand for $1 billion will further mobilize nationalist sentiment behind him.

Given that Trump is intent on confronting North Korea, it is a mystery why he would want to alienate South Korea—an ally that has much larger armed forces on the Peninsula than the U.S. does (625,000 South Korean troops vs. 28,500 Americans). It’s probable that the president, who has long complained about allies supposedly taking advantage of America, was simply popping off without giving a lot of thought to his words. And, indeed, National Security Adviser H.R. McMaster assured the South Korean government on Sunday that the U.S. is not actually going to make Seoul pay for THAAD.

But, aside from his intemperate and ill-advised language about South Korea, the Trump policy makes sense. It accords with the view of the best-informed and most hawkish experts on North Korea, who know that there is scant chance of North Korea making concessions unless it feels a lot more pressure. And the only way to apply any real pressure is via Beijing.

Saying that Trump’s policy makes sense, however, isn’t to say that it has a high likelihood of success. Sure, China may impose some temporary sanctions on North Korea, but the PRC is unlikely to squeeze Pyongyang all that hard because it will not risk regime collapse. Chaos and a potentially united and pro-Western Korea on its border is the last thing China wants.

Sooner or later, Trump is likely to realize that he’s been had–that Xi Jinping is not really his friend and he does not have any intention of “solving” the North Korean problem. What happens then? Trump has already shown he is not averse to rapid changes of positions and to taking actions–such as calling the “One China” policy into question–that are anathema to Beijing. The Xi-Trump “bromance” is not likely to end well.

If China doesn’t crack down voluntarily on North Korea, look for the U.S. to impose “secondary sanctions” on Chinese firms doing business with the North. The U.S. may also pursue expanded sanctions on the North, particularly the targeting of its financial system. Even those steps are unlikely to lead Kim Jong-un to voluntarily give up his nuclear program, which he views as vital for regime (and personal) survival. But they could conceivably hasten the day when Kim’s odious regime will collapse, leading to the reunification of the Korean Peninsula. That is the only solution to the North Korean nuclear threat that, in the final analysis, is likely to work.