MANILA—Philippine President Rodrigo Duterte signaled an abrupt departure from his nation’s longstanding military reliance on the U.S., ordering his defense secretary to seek gear from suppliers in China and Russia to fight drug traffickers and insurgents.

In another shift, he also said Tuesday that the Philippines would stop patrolling the South China Sea alongside the U.S. Navy, to avoid upsetting Beijing. Instead, he said the nation’s military would focus on combating drugs and terrorism.

The Philippines has had close ties with the U.S. for decades, most recently bolstering military cooperation through a 2014 pact. Both Washington and Manila have leveraged their alliance to counter China, whose increasingly assertive actions in support of its maritime claims have stoked unease in the region.

But since coming to power on June 30, Mr. Duterte has indicated he wants to distance the Philippines from the U.S., a stance that threatens to alter the Asia-Pacific region’s strategic balance. He said Monday he wanted the U.S. military to leave Mindanao, the site of a strategic base set to host American forces.

Mr. Duterte’s statements this week were the latest in a string of developments that have pleased, surprised and horrified his audiences since he took office. His so-called war on drugs and crime has already claimed 2,956 lives, according to police, and his sometimes crude statements have insulted targets as varied as the pope, the United Nations head and U.S. President Barack Obama.