MANILA (Reuters) - The Philippine Supreme Court ordered the government and security agencies on Friday to protect the environment in disputed areas of the South China Sea, responding to fishermen’s complaints of inaction against illegal Chinese activity.

The top court said it had issued a writ instructing heads of key ministries, the coastguard, navy and police to enforce international conventions and domestic laws to protect reefs and marine life in the Philippines’ 200 nautical mile Exclusive Economic Zone (EEZ).

The order represents a rare challenge by the judiciary to what critics say is President Rodrigo Duterte’s capitulation to China’s expansionism and militarization in the South China Sea, in return for economic incentives that have not been forthcoming.

The court was responding to a petition by fishing communities from two provinces who alleged that island-building by the Chinese state and Chinese fishing practices were violations of a 2016 ruling by the Permanent Court of Arbitration, in a case lodged and won by the Philippines.

Duterte has been accused of squandering the advantage of that landmark ruling by giving in to China’s strategic demands, in the hope of securing billions of dollars of loans and investments.

Friday’s order by the Supreme Court covers three disputed area, the Scarborough Shoal, the Philippine-occupied Second Thomas Shoal, and Mischief Reef, one of three reefs that China has converted into artificial islands equipped with radar, bunkers and surface-to-air missiles.

The court gave no timeframe and did not say how authorities should enforce the laws.

The justice minister and the president’s spokesman did not immediately respond to requests by Reuters for comment on the court order.

The ruling compounds what is arguably Duterte’s biggest foreign policy crisis in his presidency, as China tighten its control over the strategic waterway where more than $3 trillion (£2.3 trillion) in commerce passes each year.

Opinion polls consistently show that Duterte’s huge popularity among Filipinos has done little to change feelings of mistrust towards China.

Duterte denies caving in to Beijing but argues it is pointless and dangerous to challenge a more superior military power.

He met Chinese President Xi Jinping at a summit in China last month and, according to Duterte’s aides, voiced opposition to swarms of Chinese fishing boats near a disputed island occupied by the Philippines.

Abdiel Fajardo, president of the Integrated Bar of the Philippines, said the writ affirms the arbitration ruling and effectively reminds the authorities they have a duty to follow the constitution and domestic laws.

“The Philippines, at least through the judiciary, is not waiving its rights over them by acquiescing to the unilateral actions of another state,” he said in a text message.