President Rodrigo Duterte, a fierce critic of the United States, is now singing Washington's praises for helping him fight pro-Islamic State group militants.
"There are so many factors involved. But I'd rather be friendly to them now," Duterte told residents of the central town of Balangiga during a visit, according to an official transcript released Friday.
Islamic militants waving the black IS flag occupied the southern city of Marawi on May 23, and have fought off a US-backed military assault for more than four months.
The US deployed a P-3 Orion spy plane and provided other intelligence inputs to Philippine forces trying to retake the city in fighting which has left more than 900 people dead.
"I would not say that they were our saviors, but they are our allies and they helped us. And even today, they have provided the crucial equipment to our soldiers in Marawi to fight the terrorists," Duterte said Thursday.
"So without their help also, we would be having a hard time," he said. "So we thank you."
Duterte marked the start of his six-year term last year with foul-mouthed rants against the US as he steered his country away from the decades-old alliance while chasing trade and investment from Washington's rival Beijing.
During a visit to China last October Duterte announced his "separation from the United States," stating he was realigning with China and Russia instead.
Duterte explained that at the time, he was angry at then-US president Barack Obama for criticizing his centerpiece war on drugs, which has since seen thousands killed in police operations and suspected vigilante activities.
He had also denounced the US government over its bloody colonization of the Philippines in the 1900s.
"But these are all water under the bridge," Duterte said, citing the US alliance against Japan's occupation army during World War II.
Manila won independence in 1945 after the war, with the two countries also signing a mutual defense treaty in 1951. — Agence France-Presse