Philippines President Rodrigo Duterte has ordered police and soldiers not to co-operate in any investigation into his bloody war on drugs, amid international calls for an external probe.

Western countries and rights groups have expressed alarm over the killing by police of more than 4,000 Filipinos since Duterte took office in June 2016, plus hundreds more killings of drug users by unknown gunmen.

"When it comes to human rights, or whoever rapporteur it is, my order to you: Do not answer. Do not bother," Duterte said in a speech before elite armed police units in his home city of Davao late Thursday.

And who are you to interfere in the way I would run my country? - Philippines President Rodrigo Duterte

"And who are you to interfere in the way I would run my country? You know very well that we are being swallowed by drugs," Duterte added.

The Philippines on Tuesday welcomed a United Nations investigation into Duterte's signature anti-narcotics campaign, but not if it is conducted by the current UN special rapporteur on extrajudicial killings, Agnes Callamard, who Manila has accused of bias and of not being qualified.

An International Criminal Court prosecutor has opened a preliminary examination into a complaint accusing Duterte and top officials of crimes against humanity in the anti-drugs campaign. Duterte says he welcomes that and is willing to "rot in jail" to protect Filipinos.

Human rights advocates have said many of the police killings in the drugs war have been executions. Police deny the allegations, saying they had to use deadly force because the suspects were armed and had resisted arrest.

Other officers are purged

Despite criticism of the Philippine leader's bloody anti-narcotics campaign, Duterte remains wildly popular and is the country's most trusted public official, according to opinion polls.

Activists say police are systematically executing drug suspects, but police reject that and say killings were in self-defence, citing their more than 120,000 drug-related arrests as proof of their intent to preserve life.

Philippine Drug Enforcement Agency (PDEA) agents and police secure a part of a street as they search a house during a drug raid in Maharlika Village, Taguig, south of Manila on Feb. 28. Duterte's war on drugs has left hundreds of suspects dead and sparked international inquiries. (Noel Celis/AFP/Getty Images)

Nearly 400 police officers have been dismissed in a nationwide crackdown since mid-2016, police said separately on Friday, as Duterte also pushes to rid the force of other abuses.

Most dismissals were for robbery, extortion, or absences, while serious crimes, such as kidnapping and protecting drug dealers, figured in some others, some of which are before the courts.

Chief Superintendent John Bulalacao said in a statement. He called the campaign an "uncompromising stand against breach of discipline."

The dismissals cover the 19 months Duterte has been in office, with some investigations stemming from calls to tip lines.

About 60 arrests of police were for bribery offences committed during 24 entrapment operations by the counterintelligence task force. About 1,700 officers were disciplined, with measures ranging from reprimands, demotions and suspensions, to dismissals.

None of the officers were dismissed for their conduct in police drug operations.