US PRESIDENT Donald Trump on Wednesday said he did not mind Philippine President Rodrigo R. Duterte’s decision to end a decades-old military agreement with the United States, a position at odds with that of his defense secretary who viewed the move with dismay.

Mr. Duterte on Tuesday announced the termination of the two-decade-old visiting forces agreement (VFA), which governs the deployment of troops for war games. US Defense Secretary Mark Esper called the decision “unfortunate” as Washington and its allies press China to abide by international rules in Asia.

The US Embassy in Manila called it “a serious step with significant implications.”

Mr. Duterte’s decision, sparked by the revocation of a US visa held by a former police chief who led Mr. Duterte’s bloody war on drugs, takes legal effect in six months and US officials have expressed hope it can be reversed or delayed.

“I don’t really mind if they would like to do that, it will save a lot of money,” Trump told reporters at the White House when asked about Duterte’s move and whether anything could be done to get him to reconsider. “My views are different from others,” he added.

Mr. Trump has frequently expressed a desire to bring US military forces home from decades-long deployments abroad and has strong-armed some allies into paying more for the right to US defense.

Mr. Trump said the United States had helped the Philippines defeat Islamic State militants. He said he had “a very good” relationship with Duterte and added: “We’ll see what happens.”

Mr. Duterte’s decision could complicate US military interests in the broader Asia-Pacific region as China’s ambitions rise. Some Filipino senators quickly sought to block the move, arguing Mr. Duterte had no right to unilaterally scrap international pacts the country’s Senate had ratified.

The VFA is important to the overall US-Philippine alliance and sets out rules for US soldiers operating in the Philippines, a former US colony.

Washington has called the relationship “ironclad,” despite Duterte’s complaints that include allegations of US hypocrisy and ill treatment.

Ending the VFA complicates Washington’s efforts to maintain an Asia-Pacific troop presence amid friction over the presence of US personnel in Japan and South Korea and security concerns about China and North Korea.

Mr. Esper referred to the period before Mr. Duterte’s decision takes effect when he spoke with reporters on Tuesday.

“One hundred and eighty days. We’ve got to work through it, and we’ll just take a deep breath and take it one day at a time,” he said. “I don’t get too excited about these things. We’ve got a process we have to work through.”

Some lawmakers in the Philippines are concerned that without the VFA, two other pacts that make up the long-standing US alliance with Manila would be irrelevant, namely the 2014 Enhanced Defense Cooperation Agreement made under the Obama administration, and a 1951 Mutual Defence Treaty.

Supporters of the agreements say they have helped deter Chinese militarization in the South China Sea and $1.3 billion of US defense assistance since 1998 had boosted the capabilities of underfunded Philippine forces.

Salvador S. Panelo, Mr. Duterte’s spokesman, called the VFA a one-sided deal that only benefits the US.

“The VFA and other treaties are there because of the global strategic defense of the United States,” he said at a briefing on Thursday.

Also yesterday, Foreign Affairs Secretary Teodoro L. Locsin, Jr. said the Philippines should stop entering into a visiting forces agreement (VFA) with other countries.

“No more VFAs even with other countries,” he said in a social media post. “We stand by our own guns by buying our own with a defense budget commensurate to the threats to our sovereignty.”

The Philippine military this week said it would boost defense ties with allies in the region including China, Japan and Australia after the VFA termination.

The tough-talking Mr. Duterte on Tuesday formally notified the US of his decision to pull out of the VFA, the first time he has scrapped a military deal with the former colonial power that he had criticized for treating the Philippines “like a dog on a leash.”

His decision came after the US Embassy canceled the visa of his former police chief, Senator Ronald M. de la Rosa.

Mr. Duterte had pushed for the Philippines to be less economically and militarily dependent on the US, which he accuses of hypocrisy in its criticism of his deadly war on drugs.

Mr. Duterte ordered his chief diplomat on Monday evening to send the termination notice. It will take effect in six months.

Armed Forces Chief of Staff Felimon T. Santos, Jr. said the Philippines would also increase military engagements with Japan, South Korea, Indonesia and Australia to fill the void left by the VFA.

Mr. Santos said the Philippines would try to build its own military capability, noting that the military had been receiving P20 billion yearly under a modernization program.

He said war games with the US would proceed in May unless Washington wishes otherwise. The event falls within the 180-day notification period, he said. — Reuters with Gillian M. Cortez and Charmaine A. Tadalan