YOKOHAMA, Japan (Reuters) - Philippine President Rodrigo Duterte said on Thursday his country could join naval exercises with Japan, but repeated there would be no more war games with long-time ally the United States and again gave vent to his anger against Washington.

Philippine President Rodrigo Duterte (C) speaks to the media after his inspection at Japan Coast Guard base in Yokohama, south of Tokyo, Japan October 27, 2016. REUTERS/Issei Kato

Duterte also said he had explained to Japanese Prime Minister Shinzo Abe in talks on Wednesday just why he resented the United States, reiterating that Washington treated the Philippines like “dogs on a leash” and lectured about human rights in connection with his domestic campaign against drugs.

The Philippine leader’s visit to Japan coincides with jitters about his foreign policy after weeks of verbal attacks on the United States, including threats to end military agreements, and overtures toward China.

Duterte last week announced in China his “separation” from the United States, but then insisted ties were not being severed and that he was merely pursuing an independent foreign policy.

“Joint exercise with Japan in general terms is not a problem. Stationing of Japanese troops was not discussed and with the Americans, it’s problematic,” Duterte told reporters one day after saying he wanted foreign troops out of his country “maybe in the next two years”.

“I don’t want to embarrass my defense secretary but the exercises with the Americans will be the last,” he said.

Duterte, on the final day of a three-day visit to Japan, made the comments after watching Japan Coast Guard activities in the port of Yokohama, near Tokyo.

Slideshow ( 4 images )

Duterte’s recent comments pose a headache for Abe, who has tightened ties with Washington while building closer security relations with Manila and other Southeast Asian countries as a counter-weight to a rising China, which has maritime feuds with several countries in the region including Japan.

In their Wednesday talks, Duterte and Abe agreed on the importance of settling maritime disputes peacefully.

Duterte said he had explained to Abe why he was angry with the United States.

“I had told the prime minister some of my sentiments against the Americans. They are treating us like dogs on a leash,” he said. “The prime minister understands that.”

Domestic backing for Duterte is strong, but there is far from the same level of support for his stance on the United States. A peaceful protest outside the U.S. embassy in Manila in support of Duterte on Thursday drew about 500 people.

While Duterte’s anti-U.S. diatribes cast doubts on the future of the U.S.-Philippine security alliance, a clearer picture could emerge next month when defense officials from both sides have a meeting in Manila that takes place annually and typically plans joint exercises for the following year.

Although Duterte said there would be no more joint exercises, an army spokesman on Thursday confirmed preparations were under way for drills next month on the island of Palawan involving Filipino troops and a small unit of U.S. special forces.

“This was planned more than a year ago, but if there will be an order from higher authorities to cancel it, we will obey,” Colonel Benjamin Hao, an army spokesman, said.

“But, so far, there are no instructions.”

A scheduled call by Duterte on Japanese Emperor Akihito, 82, was canceled following the death on Thursday of Akihito’s 100-year-old uncle, Prince Mikasa.