MANILA, Philippines -- Philippine President Rodrigo Duterte said Thursday he might follow Russia’s example and withdraw from the International Criminal Court, where his critics say he could be charged over the thousands killed in his war on drugs.

In a statement before flying to Peru to attend the annual summit of Asia-Pacific leaders, Duterte also said the United Nations has been inutile in stopping wars. He said if China and Russia decide to create a new world order, he would be the first to join them and leave the U.N., which he said is dominated by the U.S.

“You know, if China and Russia would decide to create a new order, I would be the first to join,” he said, adding that he would quit the U.N.

Duterte also criticized the global agreement to fight climate change, saying there are no penalties for violators and it is not clear which industrialized countries will contribute money to support developing countries’ efforts against global warming. He said that was the reason why President-elect Donald Trump does not want the U.S. to spend on fighting climate change.

Get Breaking News Delivered to Your Inbox

During his campaign, Trump said he would pull the U.S. out of the Paris pact on climate change.

The foul-mouthed Duterte said that like Russia, he might withdraw from the ICC “because we the small ones are the only ones being beaten up,” but nothing has been done for the thousands of children and women dying in bombings in Syria and Iraq.

Duterte is expected to meet with Russian President Vladimir Putin at the sidelines of the summit in Lima. He requested for the bilateral meeting because he wants to meet and be friends with Putin, whom he said was his idol.

Human rights advocates have criticized Duterte’s anti-drug campaign that has left more than 4,000 suspected addicts and pushers dead since July. They said the killings can be a basis to charge him for crimes against humanity before the Netherlands-based court.

Duterte said he has intentionally used foul language -- including calling Obama a “son of a bitch” -- because Mr. Obama has trivialized the Philippines’ drug problem when there are already around 4 million Filipinos addicted to drugs. The country has a population of more than 103 million.