Chinese dredging vessels are purportedly seen in the waters around Fiery Cross Reef in the disputed Spratly Islands in the South China Sea in this still image from video taken by a P-8A Poseidon surveillance aircraft provided by the United States Navy May 21, 2015. U.S. Navy/Handout via Reuters/File Photo

MANILA — A Supreme Court judge called on Saturday for Manila to file an international arbitration case and a complaint with the United Nations over what the country's leader said was a threat of war made by Chinese President Xi Jinping.

Supreme Court Associate Justice Antonio Carpio, a staunch critic of Philippine President Rodrigo Duterte's business-focused rapprochement with China, said the use or threat of force to settle disputes between states is outlawed under the U.N. Charter and if the president did nothing to protest that, he was "selling us out."

Duterte on Friday said his Chinese counterpart had warned him there would be war if Manila tried to enforce an arbitration ruling and drill for oil in a disputed part of the South China Sea. China has not responded to Duterte's latest comment.

He was referring to the 2016 ruling by an arbitral tribunal in The Hague granting the Philippines sovereign rights to access offshore oil and gas fields in its Exclusive Economic Zone (EEZ), including the Reed Bank, in the South China Sea.

Carpio, who was part of the Philippine legal team that made the case in The Hague, said Xi's threat was a "gross violation" of the United Nations Charter, the United Nations Convention on the Law of the Sea (UNCLOS), and the Treaty of Amity and Cooperation in Southeast Asia to which China and the Philippines are parties.

"The Philippines' recourse is to bring China’s threat of war to another UNCLOS arbitral tribunal," he said.

"The president cannot simply do nothing, or worse acquiesce to China's action, for inaction is the opposite of protecting Philippine EEZ."

The Philippines, he said, should strengthen alliances, particularly with defense treaty partner the United States.

He also criticized Duterte for dealing with China bilaterally and "his habit of presenting a picture of hopelessness so people would agree to his own solutions like the full embrace of China."

Duterte has orchestrated a staggering reversal of Philippine foreign policy toward China, choosing not to confront Beijing over the South China Sea, but to tap it for billions of dollars of loans and investments for infrastructure, the backbone of his economic agenda.

Duterte disclosed Xi's alleged threat in a speech on Friday as he hit back at domestic critics, Carpio among them, who said he has gone soft on Beijing by refusing to push it to comply with The Hague ruling. He discussed it with Xi when they met in Beijing on Monday.

Presidential Spokesman Ernesto Abella said on Saturday a "frank discussion" had taken place with China on possible oil explorations in the South China Sea and "both parties agreed to pursue a more peaceful resolution to the matter that satisfies both our sovereign and economic rights."

Abella defended Duterte and said his two-track approach to dealing with China focused on economic growth without compromising Philippine sovereignty.