MANILA — China’s president warned the Philippines that it would go to war if Manila insisted on enforcing an international arbitration decision rejecting China’s claims over disputed areas of the South China Sea, the Philippine president said in a televised speech on Friday.

Although both sides pledged for now to talk and to avoid confrontation, the remarks by the Philippine president, Rodrigo Duterte, highlighted the stakes in a part of Asia that has become a geopolitical flash point. The warning — which Beijing did not immediately confirm — also draws attention to a policy dilemma for the United States, which is trying to maintain its naval dominance in the Pacific in the face of China’s military buildup and its construction of artificial islands in disputed waters.

In a landmark ruling last July, the Permanent Court of Arbitration, based in The Hague, delivered a sweeping rebuke of China’s behavior in the South China Sea, including the creation of islands that could be used for military purposes, and found that its claim of sovereignty over the waters had no legal basis. However, there is no legal mechanism for enforcing the decision, and Beijing has refused to abide by it.

In a speech on Friday to the Philippine coast guard, in the southern city of Davao, Mr. Duterte claimed that President Xi Jinping of China had cautioned him against trying to enforce the ruling. Mr. Xi said the two countries could eventually discuss it, “but it cannot be done now,” Mr. Duterte said.