The contradictory comments of Filipino President Rodrigo Duterte during his visit this week left Tokyo and Washington with one question: What is his true intent?

After weeks of insulting the United States and cozying up to China, the tough-talking leader seemed reasonable at Wednesday’s summit with Prime Minister Shinzo Abe.

Both agreed that the territorial dispute between the Philippines and China has to be solved based on the rule of law and without resorting to force.

Much of the joint statement with Abe also emphasized the rule of law in maritime security, and highlighted the importance of the July verdict issued by the arbitration court in The Hague, which ruled in favor of the Philippines.

Still, it is not clear whether the former prosecutor will pursue the rule of law in the South China Sea dispute.

At the beginning of the summit, Duterte, who flew to Japan late Tuesday, said he believed his country and Japan were in the same situation, pointing to Tokyo’s territorial row with China. But he also said it was not time to discuss his country’s dispute with Beijing.

Then he said that, when the time is right, the Philippines will take Japan’s side, despite his overly hostile comments against its ally the United States. During his visit to China last week, the Filipino leader said The Hague tribunal’s decision could “take a back seat.”

“It could have been lip service to Japan,” Narushige Michishita, professor at the National Graduate Institute for Policy Studies in Tokyo, said of the joint statement. “But there is nothing concrete said about the settlement of the dispute and what’s written here is very basic.”

A government official said that Duterte said nothing about what he wants China to do with the ruling, a sign the Filipino leader won’t do anything to prompt China to act on the verdict.

His comments were also inconsistent with his country’s relationship with the United States. Duterte said at the economic forum hosted by the Japan External Trade Organization on Wednesday that he hoped the U.S. military will withdraw from the Philippines in two years.

But the joint statement said the two leaders expected their alliance to contribute to the stability and peace of the region and promote maritime security. A government official said this also applied to the Philippine-U.S. alliance, and that Duterte reassured Japan that he was not cutting off diplomatic ties with Washington.

A government official said Duterte wants to be strategic by diversifying Filipino relations by shifting more toward China. But other experts said his comments lack consistency because the former Davao mayor has no experience in diplomacy.

“He has always been like that, and we have to see what he really means in the longer term,” said Naoji Shibata, a professor for Osaka-based Kindai University. “His words are situational, but that style also attracted the voters.”

His trips to China and Japan, however, revealed one common aspect: He succeeded in seeking investment to support the Philippines’ ailing economy and support for his controversial war on drugs, which has drawn international criticism over human rights concerns.

Japan pledged more than ¥21.3 billion in yen loans to fund agricultural development on the southern island of Mindanao, where Duterte was mayor of Davao, and to build two vessels for the Filipino Coast Guard.

Abe also pledged to offer rehabilitation programs for Filipino drug addicts without mentioning the alleged human rights violations linked to the deaths of more than 2,300 people since Duterte launched the police drug offensive this year.

Malcolm Cook, senior fellow at ISEAS-Yusof Ishak Institute in Singapore, said that Duterte’s position on the U.S. is not strategic but that his approach to Japan and China is, since both decided to provide economic assistance and infrastructure aid without bringing up the ugly details of the drug-dealer purge.

“What he thinks the Philippines needs from a foreign country is no criticism of his war on drugs. China and Japan are not criticizing it,” said Cook. “I am not sure if he is thinking about the regional balance of the power . . . but it’s much more focused on what he wants for the Philippines and who can help them.”

But whether his contradictions are the product of strategic calculus or his populist nature and lack of diplomatic experience, experts agree that it is not Japan nor the United States but the Philippines that might suffer the consequences from his gambit.

“Rationally, his endlessly contradictive comments will weaken the credibility of his words, also the Philippines’ international reputation,” said Wu Shang-Su, a research fellow at the S. Rajaratnam School of International Studies at Nanyang Technological University in Singapore. “In the long term, such a style will make it hard for his foreign policies to progress.”