Philippine President Rodrigo Duterte bid farewell to relations with the U.S. during a visit to China, AFP reported Wednesday. In a speech directed toward Beijing’s Filipino community, Duterte railed extensively against Washington. He vowed never to visit the U.S. and criticized the historical alliance between the two nations, saying it did not offer much to the Philippines.

"Your stay in my country was for your own benefit. So time to say goodbye, my friend," he said, speaking directly to the U.S.

The remark, made during Duterte's four-day visit to China, is the latest sign that the outspoken leader is prepared to steer his country away from its historic ties with the U.S. In Wednesday’s speech, Duterte also called Obama a “son of a whore,” something he has called the U.S. president before.

613974684 Students burn a mock U.S. flag as they call on the President Duterte to end EDCA and the VFA. Photo: Getty Images

Duterte’s election in June has brought a major shift in policy for the Philippines, once the most pro-U.S. nation in the world, according to a Pew Research Centre Study last year.  Duterte has instead been seeking closer relations with Russia and China, the U.S.’ rival in the South Pacific.

During Duterte’s trip to Beijing, he’s scheduled to meet with Chinese President Xi Jinping and Premier Li Keqiang. Prior to Duterte speaking, Chinese foreign ministry spokesperson Hua Chunying praised the Philippine leader’s efforts to increase ties and coordinate on territorial issues in the Asia-Pacific.

China claims extensive rights in the South China Sea and feuded with former Philippine President Benigno Aquino, who successfully took Beijing to international court over its territorial assertions. With Duterte in charge, however, the two nations are focusing on building political and economic ties. This comes at the expense of the U.S., which backs allies Japan and South Korea against what they deem to be unfair Chinese aggression in the strategic area.

China has also offered Duterte political and tactical support in his comprehensive war on drugs during which the leader has vowed to kill 3 million Filipinos involved in narcotics. In the months since Duterte’s election, the anti-drug campaign has killed over 3,000 people. While the campaign has been met with criticism abroad, Duterte has loudly resisted opponents and continues to maintain extremely high popularity at home with recent polls putting confidence in him at 86 percent.

Duterte's latest insults to the U.S. come as a police van rammed into anti-U.S. protestors outside the U.S. Embassy in Manila. Police used tear gas and arrest dozens of protestors in a violent crackdown on the demonstration, which called for the removal of U.S. troops from the southern island of Mindanao.