MANILA (Reuters) - The Philippines has notified the U.N. secretary-general of its decision to withdraw from the International Criminal Court (ICC), but has assured the United Nations of its commitment to the rule of law.

FILE PHOTO: Philippine President Rodrigo Duterte announces the disbandment of police operations against illegal drugs at the Malacanang palace in Manila, Philippines early January 30, 2017. REUTERS/Ezra Acayan/File Photo

President Rodrigo Duterte is pulling the Philippines out of the ICC after a court prosecutor announced last month that a preliminary examination was underway into an accusation that the president and top officials had committed crimes against humanity during a deadly war on drugs.

Duterte, known for his tough stand on crime, has repeatedly denied he ordered police to kill drug suspects. Police deny activists’ accusations of murder and cover-ups and say the more than 4,000 people killed in police encounters were armed and resisted arrest.

“The government affirms its commitment to fight against impunity for atrocity crimes, notwithstanding its withdrawal from the Rome Statute, especially since the Philippines has a national legislation punishing atrocity crimes,” the government said in a letter dated Thursday and addressed to the U.N. secretary-general.

The president of the ICC’s member assembly, O-Gon Kwon of South Korea, said he regretted the Philippine decision.

Kwon encouraged the Philippines to remain a member and “engage in dialogue” rather than withdrawing, which he said would hurt the court’s efforts to punish war crimes and crimes against humanity.

“The ICC needs the strong support of the international community to ensure its effectiveness. I encourage the Philippines to remain as a party to the Rome Statute,” he said in a statement.

The Rome Statute is the founding treaty of the ICC. The Philippines ratified it in 2011.

The Philippines’ permanent representative to the United Nations, Teodoro Locsin, published the government letter U.N. Secretary-General Antonio Guterres on his Twitter account.

The decision to withdraw was a “principled stand against those who politicise and weaponize human rights”, the government said.

The withdrawal takes effect one year after the secretary-general receives notification, according to ICC rules.

Duterte’s spokesman, Harry Roque, said on Thursday the ICC examination into the killing of drug suspects “violates the very fundamental basis by which we gave our consent to be bound by the ICC”, referring to a principle of complementarily.

Under the principle, the ICC can step in and exercise jurisdiction if states are unable or unwilling to investigate crimes.

Roque said Philippine courts were functioning well and exercise jurisdiction over any complaints.

International jurist groups and activists have criticized Duterte for what they say is an attempt to evade justice.

Lawyers say the withdrawal does not insulate Duterte from a possible indictment, as the ICC’s jurisdiction retroactively covers the period during which a country was a member of the court.