But beyond the blasts of hyperbole — he recently compared himself to Hitler — lies a real and potentially historic shift in Philippines foreign policy.
In public statements and interviews during the past week, Mr. Duterte’s top foreign policy advisers said he was seeking to break the Philippines out of the United States’ orbit and signal to China that he is ready to negotiate closer ties after years of wrangling over its military presence in the South China Sea.
The move is a radical departure for a country that has historically been the most dependable American ally in Southeast Asia, and could undermine Mr. Obama’s so-called pivot to Asia, a keystone of his foreign policy. That strategy depends on American allies to counter China’s increasing power in the region.
On the South China Sea, Mr. Duterte’s move has already tilted the balance of power, said Richard Javad Heydarian, a political scientist at De La Salle University in Manila. By declining to press claims against China over disputed territory there, despite a favorable ruling by a United Nations tribunal, Mr. Duterte has made it hard for the United States to galvanize international pressure on China over the issue.
That dispute led to deteriorating relations under the previous Philippines administration, which filed a claim against China with the United Nations maritime tribunal over the Scarborough Shoal, a reef claimed by both nations and occupied by China.
The tribunal ruled in the Philippines’ favor in July. There is no enforcement mechanism for the ruling, and it has been dismissed by China.
But the victory has given Mr. Duterte a stronger hand in negotiations, where he is expected to use the ruling as leverage in reaching his own deal with China in a way that will allow its leaders to save face.
In August, he sent former President Fidel Ramos, 88, to Hong Kong to meet with officials in what Mr. Ramos described as an effort to build trust and find common interests.
Advisers to the president say one potential deal would be to let China maintain control of Scarborough Shoal if it made concessions such as restoring access to Filipino fishermen and investing in infrastructure development in the Philippines.
“He doesn’t want to provoke China any further,” Jesus G. Dureza, a longtime friend of Mr. Duterte’s who holds the cabinet post of peace adviser, said in an interview. “He feels aligning with our allies against China is not going to benefit the country.”
Mr. Dureza said he and other cabinet members favored opening direct talks with China in part because of fear that, despite a 65-year-old mutual defense treaty, the United States would not be willing to defend the Philippines.
“The idea is that our allies are not going to go to war for us, so why should we align with them?” he said.
Relations with Beijing have already grown warmer, he said, with Chinese officials saying that now “we can talk like Asians across the table with Asians.”
At the same time, despite the sometimes harsh words, Philippine officials have made it clear that the new president does not want to abandon the United States.
“While we would like to foster a closer relationship with China, we will certainly not engage in any alliance with China in a military viewpoint because that has never been the intention of the president,” Mr. Yasay, the foreign secretary, said at a Senate hearing on Thursday. “The president, on many occasions, has said categorically that he will only have one military alliance, and our only ally in that respect is the United States.”
That statement may suggest a future in which the Philippines plays the big powers against each other.