Philippine President Rodrigo Duterte has threatened to quit the United Nations organization on Sunday and invite China and others to form a new one after UN criticised his war on drugs as a crime under international law.

Duterte also accused the UN of failing on terrorism, hunger and ending conflicts.

Almost 600 suspected drug peddlers and users have already lost their lives in extrajudicial killings since Duterte came to the power six weeks ago. But the rights groups claim the number is more than 1,000.

The UN has repeatedly condemned the deaths of the suspected drug dealers and users as a violation of human rights.

Last week, two UN human rights experts urged Philippines to stop the extra-judicial executions and killings. They said the drive amounted to "incitement to violence and killing, a crime under international law".

In response to those comments, Duterte branded the experts "stupid" and said that they should count the number of innocent lives lost to drugs.

"I do not want to insult you. But maybe we'll just have to decide to separate from the United Nations. If you are that rude, we might just as well leave," Duterte told BBC.

"So take us out of your organisation. You have done nothing. Where were you here the last time? Never. Except to criticise," he added.

Duterte said the UN should refund its contribution so that they can leave the organization.

"You now, United Nations, if you can say one bad thing about me, I can give 10 [about you]. I tell you, you are [useless]. Because if you are really true to your mandate, you could have stopped all these wars and killings," he said.

UN Secretary General Ban Ki-moon and the UN's Office on Drugs and Crime (UNODC) have both condemned Duterte's "apparent endorsement of extrajudicial killings, which is illegal and a breach of fundamental rights and freedoms".