MANILA - The Philippines is hitting back at criticisms that it is going soft on Beijing.

Its top diplomat said on Wednesday (May 30) that Manila has lodged dozens of diplomatic protests in the past two years over China's conduct in the South China Sea, while a top security official warned that the Philippines would be prepared to go to war if its soldiers are harmed in the disputed waters.

"We have been filing diplomatic protests… Several dozens, maybe 50 to 100, over the past two years," Foreign Secretary Alan Cayetano said at a congressional hearing.

He said Manila had sent diplomatic notes that prevented China from occupying Scarborough Shoal, a disputed atoll just 358km west of the main Philippine island of Luzon, and towing a transport ship that ran aground on Second Thomas Shoal in the late 1990s and now manned by Philippine troops.

Mr Cayetano said there were concerns last year that China was setting up a permanent base when one of its ships ran aground inside a lagoon at Scarborough Shoal. The Philippines sent a diplomatic note and the ship was removed.

Supply runs to Philippine soldiers stationed at Second Thomas Shoal, meawhile, have gone unimpeded, he added.

"We inherited a bad situation, and we're trying to make good of a bad situation," the foreign secretary said.

He also defended the Philippines' low-key approach to negotiating with China, saying it has yielded more results than former president Benigno Aquino's "microphone diplomacy".

"The Aquino government wanted to shout it out to them and bring all (disputes) to all multilateral forums. We said we won't be talking if we do it that way. We're trying the opposite way."

Mr Cayetano said the Philippines has been able to gain a commitment from China not to occupy uninhabited reefs in the South China Sea or unilaterally explore for oil and gas in disputed waters.

"We are thankful that China is now treating us as a good neighbour," he added

His comments came after National Security Adviser Hermogenes Esperon said the Philippines is prepared to go to war if its soldiers are harmed in the disputed waters.

He said the Philippines would always try to defuse tension through talks, but war could not be ruled out as a last resort.

"The president said if his troops are harmed, that could be his red line," Mr Esperon told reporters on Wednesday.

President Rodrigo Duterte has drawn flak in recent weeks for not confronting China, following news that the country has installed missile systems and landed strategic bombers on its artificial islands in the South China Sea, including areas within the Philippines' exclusive economic zones.

China claims three-quarters of the South China Sea, a strategic route through which about US$3 trillion (S$4 trillion) worth of sea-borne goods passes every year. The Philippines, Vietnam, Malaysia, Brunei and Taiwan have rival claims.

At the congressional hearing on Wednesday, representative Gary Alejano insisted that the Philippines was letting China "establish the norms".

"Peace and stability to them is agreeing with them. We are now surrendering to them because we want to appease them," he said.

Mr Alejano, a former Marine captain, said he has been receiving reports that China continues to harass Filipino fishermen around Scarborough and disrupt supply runs to Second Thomas.