The Philippines will keep having large-scale combat exercises with the United States after President Rodrigo Duterte retracted his decision to terminate a key defense pact in a move that may antagonize an increasingly belligerent China.

Duterte’s decision was announced Friday by Defense Secretary Delfin Lorenzana in a joint news conference with visiting U.S. counterpart Lloyd Austin in Manila. It was a step back from the Philippine leader’s stunning vow early in his term to distance himself from Washington as he tried to rebuild frayed ties with China over years of territorial rifts in the South China Sea.

“The president decided to recall or retract the termination letter for the VFA,” Lorenzana told reporters after an hour-long meeting with Austin, referring to the Visiting Forces Agreement. “There is no termination letter pending and we are back on track.”

“Our countries face a range of challenges, from the climate crises to the pandemic and, as we do, a strong, resilient US-Philippine alliance will remain vital to the security, stability and prosperity of the Indo-Pacific,” Austin said. “A fully restored VFA will help us achieve that goal together.”

Terminating the pact would have been a major blow to America’s oldest alliance in Asia, as Washington squares with Beijing on a range of issues, including trade, human rights and China’s behavior in the South China Sea, which Beijing claims virtually in its entirety.

The U.S. military presence in the region is seen as a counterbalance to China, which has used force to assert claims to vast areas of the disputed South China Sea, including the construction of artificial islands equipped with airstrips and military installations. China has ignored and continues to defy a 2016 international arbitration ruling that invalidated its historic basis.

China, the Philippines, Vietnam and three other governments have been locked in the territorial standoff for decades. The U.S. doesn’t lay any claim to the busy waterway and has sailed Navy warships close to Chinese-claimed islands on so-called freedom of navigation operations in a challenge to Beijing.

Beijing has warned Washington to stay away from what it describes as a purely Asian dispute.