(Bloomberg) -- The Philippines appears to be softening its tone toward the U.S. before holding talks with Beijing on the South China Sea.

President Rodrigo Duterte let the insults fly last year, telling former leader Barack Obama to “go to hell” for opposing his drugs war and announcing a “separation from the U.S.” during a trip to Beijing. He also sought to buy more military equipment from Russia.

Now Duterte’s government wants the U.S. to actively promote security and cooperation in the South China Sea, according to acting Foreign Affairs Secretary Enrique Manalo. He downplayed any friction between the longstanding military allies.

“Our relationship with the U.S. is strong and vibrant,” Manalo, who was appointed last month, said Friday in an interview in his Manila office. “The key is not letting these rough patches affect the core of the relationship.”

The friendlier posture toward the U.S. comes as tensions rise with China after an official said it would install monitoring stations on the disputed Scarborough Shoal, about 250 kilometers off the Philippines coastline. While the Philippines accepted China’s offer to host bilateral talks next month over disputes in the sea, mixed messages continue to flow from Manila.

“China has been causing some problems, doing things in and around the South China Sea, even in the Philippines’ exclusive economic zone, that go against what Duterte may have wanted,” said Malcolm Cook, senior fellow at the Institute for South East Asian Studies in Singapore.

“And Manalo, as a longstanding career diplomat, may reflect the government view which is different from the Duterte view, that the U.S. is the Philippines’ most important economic partner and security partner.”

For more on how China’s maritime push confronts international law, click here

Duterte said last week that the Philippines should occupy and inhabit disputed land features in the South China Sea to assert ownership. While the comments were quickly walked back by his spokesman Ernesto Abella, they mark a stark contrast from when Duterte reaped $24 billion worth of investment deals on his Beijing trip last year.

“We must build bunkers there or houses and make provisions for habitation,” he told reporters in Palawan province. Duterte even threatened to go to a disputed island himself and raise the Philippine flag.

Manalo, a career diplomat who was appointed after his predecessor was removed, said a meeting between Duterte and U.S. President Donald Trump later this year was being worked out. Manalo said he expected to hold talks with U.S. Secretary of State Rex Tillerson next month.

“We have a long relationship with the U.S. and we look forward to building on that,” Manalo said. “With China, we are building bridges to improve our relationship.”

Last week, the guided-missile destroyer USS Fitzgerald arrived in Subic Bay for a brief port call, highlighting what the U.S. Third Fleet described as “the strong community and military connections between the Philippines and the United States.”

On Saturday, Admiral Harry Harris, commander of U.S. Pacific Command, directed the Carl Vinson Strike Group to depart Singapore toward North Asia instead of stopping in Australia as planned.

Investors Confused

The uncertainty generated by Duterte’s sudden shifts in foreign policy priorities could raise questions among investors, said Capital Economics senior economist Gareth Leather in an email Friday. He added that Duterte’s earlier moves to devolve economic policy to his respected finance team had been encouraging.

“The president’s increasingly erratic and crass style is a major concern, and the risks to our medium-run GDP growth forecast of around 6.5 percent lie firmly to the downside,” Leather said.

Unlike other countries in Asia such as Vietnam, Korea and Taiwan, the Philippines has had little success integrating its economy with China and exports about 50 percent more to the U.S., according to Leather. That means closer ties with China were unlikely to yield greater economic benefits at the risk of undermining a much more important bilateral relationship, he said.

For more on defense arrangements between the Philippines and the U.S., click here

Foreign investment flows in and out of the Philippines have also shifted direction in recent weeks. The last week of March saw a net outflow of $251.2 million from Philippine equities, while the first week of April brought a net inflow of $167 million.

Story continues