President Rodrigo Duterte yesterday said the Philippines would require ships of other nations - "in an unfriendly manner", if need be - to seek clearance before passing through the country's waters.
The move comes amid a simmering row between Manila and Beijing over the unannounced passage of Chinese warships through the Philippines' 12-nautical-mile territorial sea.
Mr Duterte's spokesman Salvador Panelo said: "To avoid misunderstanding in the future, the Philippines is putting on notice that, beginning today, all foreign vessels passing our territorial waters must notify and get clearance from the proper government authority well in advance of their actual passage.
"Either we get a compliance in a friendly manner, or we enforce it in an unfriendly manner."
Mr Panelo said the instruction came directly from Mr Duterte.
Asked by reporters if this meant "military action", Mr Panelo said: "Well, if it will have to take that, we will do it."
The statement is uncharacteristically assertive for Mr Duterte, who has made it a core foreign policy to cultivate warm ties with Beijing. He has often said he does not want to provoke China into an argument or a conflict, as the Philippines would likely pay a heavy price.
Mr Duterte will embark on his fifth visit to China next week. The visit is expected to be less cordial than previous ones, as he has signalled his intention to discuss with his Chinese counterpart Xi Jinping a 2016 ruling by an international tribunal on a case lodged by Manila that invalidated Beijing's claim to most of the South China Sea.
China has refused to accept that ruling. Its top envoy in Manila said that position is unlikely to change.
Mr Duterte's visit to China is also being shadowed by tensions stoked by the unannounced passage of several Chinese warships through the Philippines in recent months.
Security officials have reported several such sightings since February, including a Chinese frigate as well as various transport, supply and surveillance vessels sailing near an island in Palawan province in central Philippines, and through the Sibutu Strait, which separates the Philippines' Sulu archipelago and Borneo.
Lieutenant-General Cirilito Sobejana, commander of the military's Western Mindanao Command, said the moves did not appear to be "innocent", as there was no prior notification and the ships had turned off their automatic identification systems to avoid radar detection.
Brigadier-General Edgard Arevalo, spokesman for the military, said the passages "could be considered trespassing".
The foreign ministry this month made diplomatic protests over these incidents.
It has also protested against the presence of more than 100 Chinese fishing vessels off Thitu Island, a tiny isle it holds near China's militarised artificial island at Subi Reef, last month.
Apart from these purported incursions, there have been flare-ups over the growing population of Chinese workers across Metro Manila.
Last week, Defence Secretary Delfin Lorenzana voiced concerns over the proximity of Chinese offshore gaming companies to military bases across Metro Manila.
He warned that Chinese nationals working for these firms could be mobilised to spy on the Philippines.
Chinese Ambassador Zhao Jianhua said Filipinos working in China could just as easily be accused of spying. Mr Lorenzana said this was "preposterous".
Mr Duterte himself weighed in, saying China could spy on the Philippines even from afar.