Hong Kong(CNN) The Philippines has reversed its decision to end an important military agreement with the United States as territorial tensions with China heat up in the South China Sea.
President Rodrigo Duterte had decided to retain the Visiting Forces Agreement (VFA) "in light of the political and other developments in the region," said Philippine Foreign Affairs Secretary Teodoro Locsin Jr. in a social media post Tuesday.
The agreement, signed in 1988, gives US military aircraft and vessels free entry into the Philippines and relaxes visa restrictions for US military personnel.
The Philippine government gave the US 180 days' notice to end the deal in February, suggesting that Manila needed to rely on its own resources for its defense. On Tuesday, the US welcomed the change of heart.
"Our long-standing alliance has benefited both countries, and we look forward to continued close security and defense cooperation with the Philippines," said a statement from the US Embassy in Manila.
The Philippines was once home to two of the America's largest military bases outside of the US: Clark Air Base and Subic Bay Naval Station.
Although those ceased to be US bases in the early 1990s, US forces still had access to them under the VFA and Manila maintained strong military ties with Washington.
But over the past few years, Duterte has been tilting away from those historical ties with the US and toward China, which has offered a closer economic relationship with Manila.
"I need China. More than anybody else at this point, I need China," Duterte said before flying to China in April 2018.
Compared with his predecessors, Duterte has viewed the Philippines' ongoing territorial dispute over the South China Sea as more negotiable.
Both the Philippines and China are among several nations with overlapping claims to the sea, or parts of it. China claims almost all of the South China Sea's 1.3 million square miles as its own despite other claimants having borders that are far closer to the disputed waters.
Last year, Duterte said he had been offered a controlling stake in a joint energy deal by Chinese President Xi Jinping in exchange for ignoring an international arbitration in Manila's favor on the South China Sea.
In 2016, a tribunal in The Hague ruled in favor of the Philippines in a maritime dispute, concluding China has no legal basis to claim historic rights to the bulk of the South China Sea.
China, however, has been stepping up its military presence on islands also claimed by the Manila.
In the past two months, the People's Liberation Army has moved advanced anti-submarine warfare and reconnaissance aircraft to Fiery Cross Reef, known as Kagitingan in the Philippines, in the Spratly Islands chain.
Beijing has also made Fiery Cross part of its southern Hainan province, creating two new administrative districts covering the South China Sea that are headquartered in the Paracel Islands, another island group with disputed claims.
Additionally, China has maintained a presence of maritime militia vessels around Thitu Island, the largest Philippine occupied island in the Spratly archipelago, for well over a year, according to the Asia Maritime Transparency Initiative.
An average of 18 Chinese vessels have been around the island each day, according to an AMTI satellite analysis published in March, hampering Philippine attempts to build up infrastructure there.
On Wednesday, Locsin indicated that the Philippines sees the US playing a role in the region for some time to come.
"We look forward continuing our strong military partnership with the United States, even as we continue to reach out to our regional allies in building a common defense towards enduring stability, peace and continuing economic progress and prosperity in our part of the world," he said.