Philippine president Rodrigo Duterte has signalled he wants to move his country away from dependence on the United States, ordering all US special forces out of the southern Philippines.
The order came after Mr Duterte boasted about snubbing his US counterpart Barack Obama at a summit of world leaders in Laos last week, after earlier labelling him the "son of a whore."
The US has long been most important military ally of the Philippines, which Washington ruled from 1898 until 1946, except for a period of Japanese occupation during World War II.
In January the Philippine Supreme Court upheld the validity of the defence cooperation pact that gives the US military the right to increase troops deployed to the Philippines for war games, as well as bringing equipment into military areas including Subic Bay, the former site of a US naval base.
A spokesman for Mr Duterte, a blunt-speaking former mayor of Davao, said the president's order expelling about 50 US special forces from the southern Philippines "reflects new direction towards coursing an independent foreign policy."
Mr Duterte has been openly critical of the US since taking office in June, unsettling his country's relationship with the Obama administration at a time of heightened tensions over China's aggressive claim to almost all of the strategically important and resource rich waters of the South China Sea.
China and Russia on Monday began their first joint military exercise in the disputed waters, highlighting an increasingly close relationship that threatens to escalate tensions between the US and China.
The region has also been shaken by North Korea's recent nuclear detonation.
Mr Duterte's unpredictable statements, apparently often made without prior consultation to his diplomatic advisers, are causing concern among the 10-member states of the Association of South-East Asian Nations.
While declaring that he is "not a fan" of the US, Mr Duterte has made cautious remarks about China and has accepted Beijing's offer to build rehabilitation centres for Philippine drug addicts as part of his shoot-on-sight "war on drugs" that has so far left about 3000 people dead, many of them shot by police and vigilantes.
After returning to the Philippines from his first overseas trip as president last week Mr Duterte refuted reports that Mr Obama had cancelled a meeting with him after his "son of a whore" remark.
"I purposely did not attend the bilateral talks with the president of the United States," he said.
"I really skipped that one…your cannot just (lecture) a president of a sovereign state. Even Obama. It would be wrong for him to do that. That is why I swore against him."
Mr Duterte, the first Philippine leader who claims Muslim ancestry, ordered US forces from southern Mindanao before any Philippine official formally notified the US.
White House spokesman Josh Eanest said Mr Duterte had a tendency to make "colourful comments" and drew a comparison with Republican presidential nominee Donald Trump.
A US State Department spokesman John Kirby said the US remains committed to its alliance with the Philippines.
Mr Duterte told newly appointed government officials that the US forces still in Mindanao are high-value targets for the Islamic State-linked Abu Sayyaf terror and kidnap-for-ransom group.
"They have to go. I do not want a rift with the US but they have to go," Mr Duterte said, referring to the Americans.
"They will really kill them, they will try to kidnap them to get ransom."
In 2002 the US deployed troops to train, advise and provide intelligence and weapons to Filipino troops fighting the about 500-strong Abu Sayyaf on remote islands.
But most of the US forces withdrew in February last year, leaving only a small group of technical advisers remaining.
Mr Duerte last month ordered the Philippine military to go "full force" to wipe out the Abu Sayyaf as thousands of additional troops were deployed into the remote southern islands.
Dozens of soldiers and militants have been killed in battles.
The Abu Sayyaf claimed responsibility for a bomb that ripped through a popular night market in Mr Duterte's hometown on September 2 that prompted him to declare "a state of lawlessness" giving additional powers to security agencies.
The Abu Sayyaf are holding at least 23 hostages, including a Dutch birdwatcher kidnapped in 2012 and a Norwegian man abducted from a beach resort last year.
For years the group has eluded Philippines security forces as its militants conducted some of the country's worst terrorist attacks, including a ferry bombing that killed at least 100 people in 2004.
They beheaded two Canadians and a Filipino earlier this year.
The militants have kidnapped dozens of foreigners and Filipinos for ransom in a business that has netted them millions of dollars.
Mr Duterte, who was swept into office in May on a pledge to eliminate criminals, initially called on the Abu Sayyaf to lay down their arms but quickly adopted a tough stance when his overtures were rejected.
"Go out and destroy them. Kill whoever they are," he said.
While Abu Sayyaf leaders claimed allegiance to Islamic State in videos last year, analysts say the group has been focused on its kidnapping business.