Image copyright EPA Image caption Mr Duterte said he would take responsibility if any of those he named turned out to be innocent

Philippines President Rodrigo Duterte has accused dozens of current or former politicians, officials and judges of links with illegal drugs and told them to surrender to be investigated.

In a nationally televised address, Mr Duterte named those he was accusing and ordered their security to be withdrawn.

"If you show the slightest violence in the resistance, I will tell the police, 'Shoot them'," he said.

Local media reports say some of those named have been misidentified.

Duterte: 'Punisher' to president

The Inquirer newspaper said one judge named by Mr Duterte as an alleged protector of the illegal drugs trade had been dead for eight years.

Its attempt to verify those on the president's list also revealed that some no longer or had never held power and others were identified with the wrong municipality or province.

The full list included seven judges, as well as current or former mayors and congressmen and a large number of serving or retired law enforcement officers.

'I will whack you'

Referring to the mayors he had named, Mr Duterte said: "I am removing their operational authority over them [police]. Twenty-four hours, everybody, military police, attached to them, report to your mother unit. I give you 24 hours or I will whack you and dismiss you from the service."

Mr Duterte said he would take full responsibility for any who turned out to be innocent.

The president said he had been forced to announce the move because of the scale of his country's illegal drug problem. Hundreds of thousands of Filipinos were addicted, he said.

Mr Duterte was sworn in as president in June, after winning a landslide election victory a month earlier.

He had previously been mayor of the country's third biggest city, Davao, for 22 years where his tough approach and controversial comments earned him the nickname "The Punisher".