Rodrigo Duterte has claimed his “only sin” is the killing of thousands of people during his war on drugs in the Philippines.

The president made the apparent confession in a speech criticising opposition leader Francis Pangilinan during an oath-taking ceremony at his palace in Manila.

“What is my sin? Did I steal money, even just one peso?” he is reported as saying. “Did I prosecute somebody I sent to jail? My only sin is extrajudicial killings.”

At least 4,000 people, mostly small-time drug users and dealers, have been killed in shootouts with police during anti-drugs operations since Mr Duterte came to power in June 2016.

However human rights organisations argue the true figure, including vigilante executions believed to be sanctioned by the state, is closer to 13,000.

Mr Duterte has previously acknowledged the existence of extra-judicial killings but has denied they are state-sponsored.

In his speech on Thursday he also appeared to blame the police, describing them as “ninja cops”. He added: “It is an organised crime really.”

The president went on to lash out at the International Criminal Court (ICC), which announced in February that it was carrying out a preliminary examination of the alleged crimes.

“You are actually exercising functions that you are not supposed to do, (which) belongs to the government. At the very least, you are committing usurpation of authority,” Mr Duterte said.

Six months ago Mr Duterte announced that he was withdrawing from the ICC but the move will not take effect until March 2019.

The most controversial quotes from Rodrigo Duterte Show all 9 1 /9 The most controversial quotes from Rodrigo Duterte The most controversial quotes from Rodrigo Duterte On killing drug addicts “These sons of whores are destroying our children. I warn you, don’t go into that, even if you’re a policeman, because I will really kill you. If you know of any addicts, go ahead and kill them yourself as getting their parents to do it would be too painful” The most controversial quotes from Rodrigo Duterte Message to China “I will go there on my own with a Jet Ski, bringing along with me a [Phillipino] flag and a pole, and once I disembark, I will plant the flag on the runway and tell the Chinese authorities, ‘Kill me’ ” AP The most controversial quotes from Rodrigo Duterte Christmas message to law-breakers “If you do not want to stop, and just continue committing crimes, then this would be your last Merry Christmas” AP The most controversial quotes from Rodrigo Duterte On sex life “I was separated from my wife. I’m not impotent. What am I supposed to do? Let this hang forever? When I take Viagra, it stands up” AFP/Getty Images The most controversial quotes from Rodrigo Duterte On the drugs trade “None of my children are into illegal drugs. But my order is, even if it is a member of my family, ‘kill him'" AP The most controversial quotes from Rodrigo Duterte Insulting the Pope “We were affected by the traffic. It took us five hours. I asked why, they said it was closed. I asked who is coming. They answered, the pope. I wanted to call him: ‘Pope, son of a wh**e, go home. Do not visit us again’” AFP/Getty Images The most controversial quotes from Rodrigo Duterte Joke about rape “I saw her face and I thought, 'What a pity... they raped her, they all lined up. I was mad she was raped but she was so beautiful. I thought, the mayor should have been first” AFP/Getty The most controversial quotes from Rodrigo Duterte Insulting Barack Obama "Mr Obama should be respectful and refrain from throwing questions at me about the killings, or son of a bitch, I will swear at you in that forum" REUTERS The most controversial quotes from Rodrigo Duterte On Abu Sayyaf Islamic militants "If I have to face them, you know I can eat humans. I will really open up your body. Just give me vinegar and salt, and I will eat you. If you annoy me to the fullest... I will eat you alive. Raw" EPA

The ICC said their examination was continuing, adding: “The ICC retains its jurisdiction over crimes committed during the time in which the state was party to the statute and may exercise this jurisdiction over these crimes even after the withdrawal becomes effective.”

Mr Duterte has made of series of outlandish statements since coming to power. When his son Pablo Duterte was accused of involvement in the shipment of £93m-worth of crystal methamphetamine from China, the president exhorted police to kill him if the allegations were proven.

Three months ago he warned drug suspects to stay in jail if they wanted to live longer.