Chinese President Xi Jinping in Beijing on Aug. 1. (Andy Wong / Pool/European Pressphoto Agency)

All eyes are on President Trump in the showdown with North Korea, but this is very much China’s moment. How Beijing handles the brinkmanship of Kim Jong Un is the most important test the Chinese have yet faced in their decades-long effort to take a place in the first rank of world powers.

The crisis is first a measure of China’s reliability. If it is to achieve its goal of becoming a dominant force in the Asian Pacific, other powerful nations in the region must feel a degree of confidence that Beijing can make sound decisions and carry them out wisely. North Korea’s existence is the oldest foreign policy decision of the Chinese Communist government. The Red Army’s intervention in the Korean War in 1950, which drove back the American-led U.N. forces and compelled a cease-fire, was the birth of a divided Korean Peninsula.

And what is the fruit of that Chinese action after nearly 70 years? A hermit kingdom of wretched poverty, ruled despotically by a thuggish family bent on destabilizing the world. For many decades, China has tolerated this humiliating failure as a way of tweaking the United States at low cost.

But now the audience of greatest concern to China — namely, the other leading countries in the region, including Japan, India, Australia, South Korea, the Philippines and Vietnam — faces the urgent question of whether they can trust a rising China to share in safeguarding their sphere. If the problem of Kim isn’t defused, those nations are sure to seek even deeper alliances with the United States while building their own military capacity. China’s regional influence will shrink rather than grow.

After all, regardless of what foreign leaders may think about Trump and his reckless rhetoric, the United States has its own track record in the Asian Pacific. While North Korea has necrotized under the Chinese protectorate, South Korea has flourished beyond any reasonable expectation. The contrast between Eastern and Western influence is as stark at the 38th Parallel as it was at the Berlin Wall, and countries pursuing their own interests will have no trouble choosing sides.

The crisis is also a measure of Chinese strength. So far during its rise, Beijing has been graded solely on its economy. That performance has been impressive, but translating economic muscle into hegemony is no easy matter. Germany, Japan and South Korea have all enjoyed periods of explosive growth as low-cost manufacturers, yet none of them has risen above the second tier of global influence.

Kim’s behavior has clearly become a net negative for China, massively undercutting Beijing’s efforts to close the American umbrella in the East. If China cannot settle a situation that is so plainly adverse to its interests, it will be revealed as a paper tiger.

And finally, North Korea is a measure of China’s readiness to lead. The extraordinary power that the United States has accrued and wielded over the world since the 1940s is obviously a source of resentment and envy among Chinese leaders (even as they send their children to American schools and eagerly rip off American technology). But that power has not come without costs. U.S. leaders have been forced into uncomfortable alliances and dragged into unpleasant conflicts. Our foreign policy has often been a bitter business of choosing among unpromising alternatives and taking one step back for every two steps forward. Our people have been asked, time and again, to bear burdens and take risks and suffer embarrassments for uncertain gains in far-off places.

This is what leadership requires. As the saying goes, the higher you climb up the pole, the more your rear end shows. China cannot solve the crisis of North Korea without incurring some costs. Immediate risks include the danger of massive refugee flows from a decapitated North Korea and the possibility of a reunified Korea shaped by the capitalist South. Many commentators are calling these risks “intolerable,” but what they’re missing is the greater risk to China’s long-term ambitions posed by a failure to pacify its rogue neighbor.

Trump’s bellicose tone in recent days has been regrettable, but the underlying content of his words is entirely true: The United States possesses the power to destroy North Korea many times over, and that power is surely “locked and loaded” aboard untraceable submarines within easy range of Pyongyang. As guarantor of the nuclear peace, the United States is prepared to punish severely any military use of a nuclear weapon anywhere in the world.

But it is China that stands at the crossroads in this crisis. Beijing’s willingness to vote for tough sanctions in the United Nations is a sign pointed in the right direction. History will amply reward decisive steps in this direction, as the world sees that China is ready for the leadership role it seeks. Failure in this moment will, on the other hand, set back China’s rise for decades to come.

Read more from David Von Drehle’s archive.