More than six years after his ascension to power, North Korean leader Kim Jong Un paid his first visit to China on March 25 to meet with President Xi Jinping. The trip came at a time when the world was still recovering from the shocking announcement of an upcoming summit between Kim Jong Un and US President Donald Trump. There is no doubt that Kim’s meeting with Xi has helped to mend a fraying Sino-DPRK relationship and will strengthen the North’s position in its upcoming meetings with the US and South Korea. The North Korean diplomatic maneuver is a classic case of playing the United States and China off against each other to enhance Pyongyang’s bargaining leverage. The key question now is whether the two countries can outmaneuver Pyongyang to advance their mutual interest in finding a diplomatic solution to the issue of North Korea’s denuclearization.

Since Kim Jong Un assumed power in December of 2011, several specific and practical reasons have stood in the way of a of top-level meeting between China and North Korea. Pyongyang pushed for the Chinese president to visit North Korea first to show his support of the young and green North Korean leader. The Chinese, not surprisingly, rejected this attempt on protocol grounds, arguing that Kim should visit China first given the seniority of both China and Xi in the bilateral relationship. Chinese-North Korean ties subsequently deteriorated due to Xi’s pursuit of a “honeymoon” with South Korea, North Korea’s defiant nuclear and missile testing, and China’s cooperation with the US on trade sanctions, which collectively made a meeting between the two leaders unfeasible.

The single most important factor that has changed that equation was the March 8 announcement of a summit between President Trump and Kim Jong Un. China resented being cut out of the diplomatic maneuvering that preceded the announcement and feared its exclusion from what was shaping up as a bilateral negotiation between the US and North Korea over nuclear and related issues. China’s desire to reassert its role and influence over the future of the peninsula prompted Beijing to invite Kim Jong Un to Beijing, a gesture to show the world that trying to keep China out of the US-DPRK loop is an exercise in futility. The Chinese official media portrayed Kim’s visit as a victory for China. Yet there was no disguising the reality that Beijing was forced to extend the invitation if it did not want to watch the unfolding Trump-Kim summit from the sidelines. For Xi, who had just made himself president for life and consolidated his supreme authority, this was no doubt a bitter pill to swallow.

Kim Jong Un is taking a page out of his grandfather’s playbook in exploiting the differences and competition between two great powers in order to maximize North Korea’s options and benefits. His maneuver last month bears striking resemblance to his grandfather’s manipulation in the 1960s of Beijing’s and Moscow’s desires to curry North Korea’s favor. When the Sino-Soviet split deepened in 1960, North Korea leveraged its status in the communist bloc to extract political and economic gains from both sides. In May of that year, Kim Il Sung, disappointed with the Soviet Union’s refusal to provide additional economic assistance and the postponement of Khrushchev’s trip to North Korea, paid a secret visit to China, during which he extolled China’s domestic and foreign policies. In the escalation of competition, Moscow rushed to invite Kim Il Sung to visit Moscow and forgave North Korean debt of 900 million rubles, which in turn prompted China to grant North Korea 420 million rubles of assistance from 1961 to 1964 despite China’s domestic famine and economic difficulties. In addition, as Chinese expert Shen Zhihua has argued in The Last Heavenly Court: Mao Zedong, Kim Il-Sung and Sino-DPRK Relations, Kim Il Sung successfully leveraged the Sino-Soviet split to force China into making major concessions in its border disputes with North Korea.

The strategy seems to have worked again. Although Kim Jong Un reiterated his commitment to denuclearization during his China visit, the caveats remain on North Korea’s conditions for its denuclearization. Improving ties with China will strengthen North Korea’s position in its negotiations with the US. The more options North Korea has and the less isolated it is, the less susceptible it will be to US pressure. China may not soften the economic sanctions on North Korea immediately. However, it is conceivable that Beijing could demand the easing of these restrictions, especially China’s unilateral sanctions against North Korea, if the North refrains from provocations even without denuclearization in the near future. This is particularly true given how much Xi and Kim emphasized their solidarity and strategic coordination.

Nonetheless, the nature of the rapid shift in relations between China and North Korea raises questions about its sustainability. Unless Kim Jong Un is fundamentally and genuinely committed to denuclearization and is willing to take prompt measures to pursue it, the essential disagreement between China and North Korea, which has been compounded by Kim’s defiance, manipulation, adventurism and disrespect of China, will persist. And the accumulated distrust and suspicion will continue to erode the foundations of the relationship, regardless of how positively the governments try to spin it. China and North Korea might coordinate and cooperate with each other on the tactical level for their own convenience. But the formerly strong alliance is now a shell of its former self. What remains is a transactional relationship that is used and sometimes abused to advance each other’s own narrow national interests.

North Korea’s exploitation of China’s geopolitical reservations about the expansion of US influence on the Korean Peninsula and Washington’s concerns about Chinese intervention in the event of a military contingency in North Korea has made it possible for North Korea to successfully pursue its nuclear program. As long as the US and China see each other as the bigger problem on the Korean Peninsula, and as long as their strategic competition overrides the shared goal of denuclearization, North Korea will have the opportunity and room to create rifts and divisions. The US and China have worked together to bring Pyongyang back to negotiations. If denuclearization is indeed the overriding priority, they should avoid letting their geopolitical tug of war over the Korean Peninsula take over.

Now that China has reasserted its vital role in the North Korea issue, policy coordination with other concerned parties should be the first order of business. President Xi’s special envoy, politburo member Yang Jiechi, has been dispatched to visit Seoul to brief the Moon administration on Xi’s discussions with Kim Jong Un. Hopefully, we will also see high level consultation and coordination between China and the US in the weeks ahead. China might have felt anxious about its exclusion from what was shaping up to be bilateral US-DPRK talks, brokered by the South Koreans, but Beijing’s ability to see through and, more importantly, move beyond North Korean diplomatic maneuvering will be the foundation for both US and China to work jointly and effectively to help ensure a successful summit outcome and keep diplomacy afloat.