Philippine President Rodrigo Duterte was meeting Thursday with his Chinese counterpart Xi Jinping in Beijing as part of a charm offensive aimed at seeking trade and support from the Asian giant by setting aside a thorny territorial dispute.

Duterte was greeted by Xi with full military honors at the Great Hall of the People, the seat of the ceremonial legislature in the heart of Beijing. The two leaders are due to oversee the signing of a raft of agreements between their governments following their discussions.

China has hailed Duterte's visit as a step toward ending years of estrangement between the countries. Tensions ran high after the Philippines won a major arbitration lawsuit against Beijing's massive territorial claims in the South China Sea just three months ago.

Duterte has walked a tightrope in trying to mend damaged relations with China while defending his country's claims in the disputed South China Sea.

In Beijing, the Philippine leader known for his devil-may-care, profanity-laden speeches said Wednesday he would not raise the issue that has angered China unless his Chinese counterpart first brought it up, out of "courtesy" to his host.

"As a matter of courtesy and in the Oriental way, you always wait," Duterte said ahead of a meeting with members of the Filipino business community in Beijing on Wednesday. "Because I am a visitor, I can't destroy the goodwill by just blurting out something."

He also signaled a major shift in reliance on the U.S., the Philippines' long-standing defense treaty ally, telling the Filipino community members: "So it's about time to say good-bye, my friend. Your stay in my country was for you own benefit."

He has already said he wants U.S. visiting troops to leave the southern Mindanao region and to President Barack Obama "you can go to hell." He has also said he would terminate joint combat exercises between Filipino and U.S. troops.

"No more American interference. No more American exercises. What for?" he said Wednesday night. "I will not go to America anymore. We will just be insulted there."

In interviews with Chinese state media published and aired this week, Duterte has said "only China can help" his country, urging the country not to leave out the Philippines from a regional trade initiative and to give his country a railroad "if you find it in your heart."

But the overtures have drawn criticism of Duterte at home in the Philippines, where the public is wary of taking a deferential attitude to a country regarded as a bully.

His visit is being watched by Washington for signs of just how seriously the new Philippine leader intends to pursue a shift away from Washington and toward Beijing, a move that could have a major impact on regional power dynamics.