Prime Minister Shinzo Abe, in his role as the chief ally of the United States, on Wednesday pressed Philippine President Rodrigo Duterte on the importance of the alliance with the U.S. in terms of securing the region.

Despite Abe’s efforts, it is too early to tell if the prime minister’s message was effectively conveyed to the Filipino leader, whose hostile comments against the U.S. raised concerns over the country’s policy shift toward China.

During the summit talk at the Prime Minister’s Office in Tokyo, the two leaders touted their “strategic partnership” and further cemented bilateral relations.

With regard to the recent decision by the Permanent Court of Arbitration in The Hague, which upheld the Philippines’ argument over the South China Sea dispute, Abe told reporters the two leaders “have confirmed the importance of peaceful resolution of maritime disputes” based on the United Nations Convention on the Law of the Sea.

“The South China Sea issue is a matter of interest for the entire local community that is directly linked to regional peace and stability,” Abe said.

RELATED STORIES Only economic deals with China, Duterte assures Japanese investors

Abe also said Japan welcomes Duterte’s recent visit to China to “improve” the bilateral relationship between Beijing and Manila.

Duterte repeated the words “the rule of law” several times, and said that Japan would be an important dialogue partner in ensuring maritime security in the region, including the South China Sea.

“The Philippines will continue to work closely with Japan on issues of common concern in the region, and uphold the shared values of democracy…. the rule of law and peaceful settlement of the disputes, including the South China Sea,” said Duterte.

The two leaders’ commitment to the rule of law was also reflected in their joint statement, which mostly addressed the importance of maritime security, and emphasized the need to solve the territorial dispute between the Philippines and China over the South China Sea based on the United Nations Convention on the Law of the Sea (UNCLOS).

Although the two Asian leaders did not talk about the role of the U.S. alliance in the region during their formal discussions, a government official said that Abe talked about the importance of the U.S. presence in the region, including the U.S.-Philippines relations at a much smaller and private talk, which lasted more than 70 minutes after the joint news conference ended.

The emphasis was also highlighted in the joint statement, which said the two leaders expect the alliance network between the two countries will contribute to the stability and peace of the region and promote maritime security.

A government official said this statement also applies to the Philippine-U.S. alliance, and said that Duterte reassured Japan that he is not cutting off diplomatic ties with the U.S.

Throughout the summit talk, Abe apparently had to engage in a delicate diplomatic balance without unnerving the volatile and emotional leader.

Abe told his Filipino counterpart that Tokyo supports his campaign against drugs, which has come under international criticism, and pledged to offer rehabilitation programs for drug-addicted patients by the year’s end.

But Abe did not raise the issue of human rights violations. The police operation in the Philippines has killed more than 2,300 since Duterte took office, and Abe apparently did not want to alienate him. The first summit between Duterte and Obama in Laos was canceled last month after Obama criticized Duterte’s extrajudicial drug war and the Filipino leader responded by calling him a “son of a whore.”

Tokyo is also helping the Philippines with economic assistance, if not on the scale of China, where Duterte visited last week and raked in a massive economic assistance.

Tokyo pledged ¥5 billion in yen loans for agricultural development in the southern Philippine island of Mindanao, where Duterte long served as mayor of the city of Davao.

To strengthen its commitment to the maritime security of the region, Tokyo also pledged a loan of some ¥16.5 billion to build two vessels for the Filipino Coast Guard to bolster rescue missions and law enforcement.

Still it is unclear if Abe’s diplomatic dance had the desired mitigating effect on Duterte’s hostile attitude toward the U.S.

Earlier Wednesday, Duterte continued his war of words against the United States, saying he wants U.S. troops out of his country, possibly within two years.

“I want to be friends to China,” he reportedly told an audience of businesspeople in Tokyo.

“I do not need the arms, I do not want missiles established in my country, I do not need to have the airports to host the bombers,” he was quoted as saying by the Associated Press.

“I may have ruffled the feelings of some but that is how it is,” he said. “We will survive without the assistance of America, maybe a lesser quality of life, but as I said, we will survive.”

Meanwhile, in a separate speech later in the day, the Philippine president pledged not to “abandon Japan in our partnership and security matters.”

He also repeated his thanks to Japan “for its role it has played in our country’s industrialization.”

He said the Philippines-Japan strategic partnership has worked well in part because both countries are so committed to it, and stand to benefit from it.

“We will contribute to the growth of your industries and your economy as you have done,” he said.

Duterte, who arrived in Japan on Tuesday on a three-day visit, repeatedly expressed his thanks for Japan’s development assistance, which is in sharp contrast to his aggressive, often insulting rhetoric against the U.S.

Japanese media paid unusual attention to the visit of the outspoken president, with reporters and camera crews following the every step of the leader.

On Tuesday he called Americans “stupid” when he met resident Filipinos in Tokyo. During his visit to Beijing last week, Duterte announced his country’s “separation” from the U.S., both economically and militarily.

Duterte later toned down his remarks, explaining that he did not mean to say he would cut off ties with the U.S. But his provocations of the U.S. have Japanese officials perplexed, because the U.S. is Japan’s main diplomatic partner and its sole military ally.

“I think he is trying to diversify his diplomatic approach to hedge risks” by leaning toward China, a senior Foreign Ministry official said.

“But it would be never be desirable (for Japan) to see a rift between the U.S.” and the Philippines, the official said, speaking on condition of anonymity.

Still, in public, Japanese officials showed no signs of concern over the U.S.-Philippines relationship. On Tuesday, Chief Cabinet Secretary Yoshihide Suga, Abe’s right-hand man, told reporters that the Japanese government “is worried about nothing” as far as Duterte’s announcement of his country’s “separation” from the U.S. is concerned.

“For our country, the Philippines is a partner that shares strategic interests based on friendly, cooperative relations that have been built up for years,” Suga told a separate news conference on Wednesday.

“We will frankly continue exchanges of opinion with the Philippines for the two countries to contribute to peace and prosperity in the region,” he said.

Japan is now expected to extend further economic assistance to the Philippines, in particular by helping create master plans for the to develop the cities of Cebu and Davao.