MANILA, Philippines — President Rodrigo Duterte said Tuesday he won't allow government forces to conduct joint patrols of disputed waters near the South China Sea with foreign powers, apparently scrapping a deal his predecessor reached with the US military earlier this year.

Duterte also said he was considering acquiring defense equipment from Russia and China. The Philippines has traditionally leaned on the US, its longtime treaty ally, and other Western allies for its security needs.

The remarks were the latest from a Philippine president who has had an uneasy relationship with the US but also has tried to mend relations with China strained over South China Sea disputes.

Duterte said he wanted only Philippine territorial waters, up to 12 nautical miles offshore, to be patrolled by Filipino forces, but not other offshore areas that are contested. He added he opposes Filipino forces accompanying foreign powers like the US and China in joint patrols which could entangle the Philippines in hostilities.

"We do not go into a patrol or join any other army from now because I do not want trouble," Duterte said. "I do not want to ride gung-ho style there with China or with America. I just want to patrol our territorial waters."

Like other security pronouncements, Duterte did not provide details, but his rejection for joint patrols apparently goes against such an arrangement announced in April by the US and the Philippine defense chiefs.

While visiting Manila, US Defense Secretary Ash Carter disclosed for the first time in a news conference with then Philippine Defense Secretary Voltaire Gazmin that US ships had carried out sea patrols with the Philippines in the South China Sea, a somewhat rare move.

Carter insisted that the US did not intend to be provocative and was "trying to tamp down tensions here." But Gazmin said he expected that US forces, "with their presence here, will deter uncalled-for actions by the Chinese."

On Monday, Duterte said he wanted US military forces out of the southern Philippines and blamed America for inflaming local Muslim insurgencies, in his first public statement opposing the presence of American troops in a part of the country.

Washington later said it had not received a formal request to remove US military personnel. White House spokesman Josh Earnest said Duterte had a tendency to make "colorful comments" and drew a comparison with Republican presidential nominee Donald Trump.

In an apparent aim to prevent potential damage in relations, Philippine officials said Duterte wanted the Americans out of the south for fear of their safety.

"He desires that our American counterparts should be eased from harm's way," the Philippine military said, adding about 100 US military personnel were in the south to provide counterterrorism advice support to Filipino forces.

"We assure our people and allies that Philippine-US defense relations remains rock solid," the military said in a statement. It added that joint combat training and other activities by US and Filipino forces this year and beyond "remain on track."