Land reclamation of Mischief Reef in the Spratly Islands in the South China Sea, shown in 2015. (Ritchie B. Tongo/Pool Photo via Associated Press)

CHINA’S COMMUNIST regime is reacting with rhetorical frenzy to a ruling by an international tribunal rejecting its expansive territorial claims in the South China Sea. President Xi Jinping, who has aggressively pushed what has now been formally deemed as illegal construction of bases on contested islets, issued a statement saying that China “will never accept any claim or action based on these awards.” He’s right that the judgment, in a case filed by the Philippines, is unenforceable. But it is a major blow to Mr. Xi’s attempt to establish Chinese hegemony in the region and presents him with a fateful choice: embark on a dangerous escalation, or slowly and quietly back down.

Beijing’s insistence that the court decision is “invalid and has no binding force” only goes so far. The Philippines sued under the Law of the Sea treaty, which China has ratified. That means the decision is legally binding whether Mr. Xi recognizes it or not. Nations far beyond Asia will watch to see if the rising superpower violates a treaty it agreed to be bound by. If it does, the damage to China’s international standing and influence could prove considerably greater than whatever it might gain from fortifying a few coral reefs.

Though the unanimous court judgment was more sweeping than some experts expected, it wasn’t particularly surprising. China has been claiming up to 90 percent of the South China Sea, an area larger than the Gulf of Mexico, based on a vague 1940s map with a “nine-dash line” sketched across it. But the treaty it ratified voided such historical claims and awarded sovereignty over waters based on their distance from coastlines. Scarborough Shoal, the fishing ground that China seized from the Philippines three years ago, is about 500 miles from the Chinese mainland; the tribunal found that Beijing had engaged in multiple unlawful actions in Philippine waters.

Having decisively won its case, the Philippines’ new government is reacting prudently. Foreign Secretary Perfecto Yasay Jr. held out the possibility of negotiations with the Xi regime and said the two governments had agreed not to take “provocative action” in the meantime. The Obama administration, which has beefed up its military alliance with the Philippines in an attempt to deter further Chinese aggression, also responded temperately. That’s fine for now: Mr. Xi, who is due to host a summit of the Group of 20 nations in September, must be given a chance to change course without losing face.

The United States nevertheless must be prepared for the possibility that Mr. Xi will double down on his adventurism, perhaps hoping to take advantage of a president in his last months of office who has responded weakly to red-line crossings in other parts of the world. For some time experts have been concerned China would attempt to militarize Scarborough Shoal, placing planes or missiles 150 miles from Subic Bay in the Philippines; it has also threatened to declare an air defense zone over the South China Sea. Any such action must be contested by the United States. The alternative would be to sanction Mr. Xi’s use of raw power to advance his nationalist aims — and open the way to serious conflict in East Asia.