Police say Rolando Espinosa shot after firing at guards, becoming second mayor in fortnight to be shot dead.
A Philippine mayor President Rodrigo Duterte named as being involved in the illegal drug trade was shot dead in jail on Saturday, police said, the second local official implicated in drugs to be killed in two weeks.
Duterte, 71, won May elections in a landslide victory on a promise to kill tens of thousands of criminals to prevent the Philippines from becoming a narco-state, and has launched an unprecedented war on drugs that has left more than 4,000 people dead.
He had named several local officials, policemen and judges as being involved in the narcotics trade and urged them to surrender.
In August, he accused Rolando Espinosa, the mayor of Albuera town in the central island of Leyte, and his son of drug trafficking and demanded they turn themselves in, giving police a "shoot on sight" order if the two resisted arrest.
Espinosa then surrendered to the national police chief, saying he feared for his life, and was arrested last month.
But early on Saturday morning, police said Espinosa was killed in his cell in the provincial jail after he shot at officers during a search for illegal firearms.
"He fired on the raiding team. The raiding team fired back and this led to the mayor’s death," Chief Inspector Leo Laraga of the regional police told AFP news agency.
He added that another inmate accused of drug trafficking was also killed, after he too fired at the officers.
The national police said that it was investigating the circumstances surrounding Espinosa’s death as well as possible collusion between guards and inmates to get guns and drugs into the jail.
Police chief Ronald dela Rosa previously said that Espinosa had been listed in official records as a "drug protector", whose son Kerwin controlled the narcotics trade in the Albuera region.
Kerwin was arrested in the United Arab Emirates last month and is to return to the Philippines to face drug trafficking charges.
In August, six of the Espinosas’ supporters died in a gunfight with police outside the mayor’s property in Albuera where officers said they recovered guns and several grenades.
Another mayor accused of drug trafficking was killed in the southern Philippines in late October.
Police said Samsudin Dimaukom and his security personnel opened fire after anti-narcotics police stopped their vehicles at a checkpoint on suspicion they were transporting illegal drugs.
Al Jazeera’s Jamela Alindogan, reporting from Tacloban - the provincial capital of Leyte, said: "Human rights lawyers were quick to condemn this incident [the killing of Espinosa]. Even senators have said this was one of the most brazen acts ever committed by police under Duterte’s presidency."
She added that any have termed Duterte’s war on drugs "a war against the poor".
"Because the majority of those being killed are living in shanty towns who really have no strength to fight what they call abuse of police power. Last week the police said there would be no scaling down when it comes to drugs."