New Philippine President Rodrigo Duterte has named five active and retired police generals as protectors of drug syndicates, and sacked those still in service.

Duterte, who has promised to rid the country of illegal drugs and criminality within six months, said in a speech Tuesday that the generals committed a crime that is tantamount to treason.

Two of the men are retired, including one who is now a mayor. The three others are in active service.

Duterte said the campaign against illegal drugs will be "a bloody fight," but reminded police to follow the law and shoot suspects only when their own lives are in danger.

Officials say since Duterte took office on June 30, about 30 suspected drug dealers have died in clashes with police.