The Philippines told the US on Tuesday it was quitting a pact key to their historical military alliance, triggering a six-month countdown to the deal's termination.

Philippine President Rodrigo Duterte ordered his cabinet to give notice to quit the Visiting Forces Agreement (VFA) after voicing anger over Washington cancelling the visa of the official who led his internationally condemned drug war.

The move also follows Duterte's repeated, unfulfilled threats to shrink or even sever the nation's ties with its former colonial master and most important military ally.

The 1998 VFA is the legal framework for the presence of US troops on Philippine soil and is central to hundreds of annual, joint military exercises, which are a major component of their deep military ties.

The 1998 Visiting Forces Agreement (VFA) is the legal framework for the presence of US troops on Philippine soil and is central to the two nations' hundreds of annual military exercises
The 1998 Visiting Forces Agreement (VFA) is the legal framework for the presence of US troops on Philippine soil and is central to the two nations' hundreds of annual military exercises AFP / TED ALJIBE

The pact requires a 180-day notice to quit, which will likely set off a period of negotiation between the two countries.

"This is a serious step with significant implications for the US-Philippines alliance," the US embassy in Manila said in a statement.

"We will carefully consider how best to move forward to advance our shared interests."

The VFA is divisive in the Philippines, with leftist and nationalist critics long arguing it guarantees special treatment for US service members accused of crimes.

Philippine and US Marines taking part in a joint  exercise in San Antonio, Zambales province, in 2014
Philippine and US Marines taking part in a joint exercise in San Antonio, Zambales province, in 2014 AFP / TED ALJIBE

But defenders of the decades-old agreement say ending it could both degrade the Philippines' ability to defend itself and undermine Washington's moves against Beijing's rise, particularly in the disputed South China Sea.

Philippine foreign secretary Teodoro Locsin, an advocate of the pact, told lawmakers last week it was fundamental to the US alliance, which had provided tens of millions of dollars in support, equipment and training for the Philippine armed forces.

"Terminating the VFA will negatively impact its (the Philippines') defence and security," Locsin said.

"Our contribution to regional defence is anchored on our military alliance with the world's last superpower," he added.

Duterte first warned he would scrap the deal in 2016, and then repeated that threat in a speech in January.

That came after Ronald Dela Rosa, the former national police chief who is now a senator, said the US had cancelled his visa without telling him why.

Philippine officials view the cancellation as a sanction for Dela Rosa's leadership of the campaign in which police have killed thousands of alleged traffickers, dealers and users.

Since the visa issue surfaced, Duterte has barred his cabinet from going to the US and has turned down President Donald Trump's invitation to a southeast Asian summit set for March in Las Vegas.

Duterte bristles at any Western criticism of his signature policy, which public opinion surveys say is widely supported by Filipinos despite the killing.