Any agreement China and the United States reach over how to deal with North Korea’s nuclear threat is a welcome development. Both nations are, after all, the two key players when it comes to easing tensions on the Korean peninsula and finding a lasting solution. The latest phone call between presidents Xi Jinping and Donald Trump makes that plain; a persuasive argument seems to have been made, prompting the American leader to lessen talk of military action. Beijing would prefer dialogue, but has not ruled out further trade measures against Pyongyang, proving the importance of pragmatism to the relationship with Washington.

In the wake of a sixth nuclear test by North Korea, Xi and Trump agreed during their 45-minute conversation on Wednesday to more tightly coordinate efforts to end the threat. Statements from both sides differed on emphasis, with Beijing stressing the importance of a resolution through dialogue and the White House speaking of a commitment by the sides to work together.

In phone calls later with the prime ministers of Britain and Australia, Trump contended that now was not the time for talks with North Korea and, while “all options remain open” to defend the US and its allies, diplomatic and economic pressure had to be increased.

That is a far cry from the zigzagging messages in recent weeks from the Trump administration, which have ranged from angry finger-pointing at China for allegedly not doing enough to rein in its ally to threats of military action. A war is not what China wants as it would be directly affected and it is certainly not in the interests of South Korea, which would be caught in the middle, with devastating consequences. While Beijing has supported the most recent Security Council sanctions and can go further, perhaps with oil and garment exports, there are limits to its efforts.

The matter is, after all, ultimately between the US and North Korea, which have still not signed a peace treaty to formally end the Korean war. Talks are the only viable way to denuclearise the peninsula and China can help bring them about but, as the discussion between Xi and Trump shows, Beijing can also calm heated rhetoric and tensions. That is also good for Sino-US ties. While North Korea is a pressing issue, it is one of many that the nations have to deal with. Trump’s upcoming visit to Beijing was highlighted in the phone call, and with it will come the discussion of matters such as trade, cybercrime and security.

Agreement on North Korea will help build confidence, which will lead to greater understanding and stability in the relationship as well as an improved chance to end the threats from Pyongyang.