Philippine president Rodrigo Duterte has said he might follow Russia's example and withdraw from the International Criminal Court (ICC), 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, Mr Duterte also said the United Nations has been unsuccessful 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 UN, which he said is dominated by the US.
UN spokesman Farhan Haq said the UN is aware of reports that Mr Duterte is considering withdrawing his country from the ICC but that the world body has not yet received any formal communication from the Philippines. He urged them and other nations to reconsider.
Mr Duterte also criticised the global agreement to fight climate change, saying there are no penalties for violators and it is not clear which industrialised 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 US to spend money on fighting climate change.
During his campaign, Mr Trump said he would pull the US out of the Paris pact on climate change.
Mr 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.
He is expected to meet with Russian president Vladimir Putin at the sidelines of the summit in Lima.
He requested the bilateral meeting because he wants to meet and be friends with Mr Putin, who he said was his idol.
Human rights advocates have criticised Mr 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.
Mr Duterte said he has intentionally used foul language - including calling Barack Obama a "son of a bitch" - because Mr Obama has trivialised the Philippines' drug problem when there are already around four million Filipinos addicted to drugs.
The country has a population of more than 103 million.