A mayor who was detained as part of the anti-drugs crackdown in the Philippines has been shot dead in his jail cell.

Rolando Espinosa, mayor of Albuera town, Leyte municipality, was involved in a fire fight with officers trying to search his cell for weapons and drugs, police alleged.

He is the second official to be slain in President Rodrigo Duterte’s anti-drugs drive, which has seen at least 3,000 people killed by police or vigilante groups since he took office in June. Most have been low level drug dealers and users, but police said “high-value targets,” including mayors and drug lords, would be their next target in a new phase of the crackdown that was launched in late October.

Espinosa handed himself into the authorities after he was implicated by Mr Duterte as being involved in narcotics. The president had listed the names of around 150 officials in August, including police officers and members of local government and judiciary, who he said, – without providing evidence – were involved in the illegal drugs trade.

He was briefly released but was jailed at Baybay, Leyte Sub-Provincial Jail, on 5 October on drug possession charges.

Acting on a warrant on Saturday, a police effort to search his cell for weapons and drugs was met with gunfire from the former mayor and another inmate, police said.

“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.

The Criminal Investigation and Detection Group claimed they recovered a loaded pistol, suspected methamphetamine and drug paraphernalia from Espinosa’s cell. Yap’s cell was also found to contain a loaded pistol, methamphetamine and cannabis.

The most controversial quotes from Rodrigo Duterte Show all 9 1 /9 The most controversial quotes from Rodrigo Duterte The most controversial quotes from Rodrigo Duterte On killing drug addicts “These sons of whores are destroying our children. I warn you, don’t go into that, even if you’re a policeman, because I will really kill you. If you know of any addicts, go ahead and kill them yourself as getting their parents to do it would be too painful” The most controversial quotes from Rodrigo Duterte Message to China “I will go there on my own with a Jet Ski, bringing along with me a [Phillipino] flag and a pole, and once I disembark, I will plant the flag on the runway and tell the Chinese authorities, ‘Kill me’ ” AP The most controversial quotes from Rodrigo Duterte Christmas message to law-breakers “If you do not want to stop, and just continue committing crimes, then this would be your last Merry Christmas” AP The most controversial quotes from Rodrigo Duterte On sex life “I was separated from my wife. I’m not impotent. What am I supposed to do? Let this hang forever? When I take Viagra, it stands up” AFP/Getty Images The most controversial quotes from Rodrigo Duterte On the drugs trade “None of my children are into illegal drugs. But my order is, even if it is a member of my family, ‘kill him'" AP The most controversial quotes from Rodrigo Duterte Insulting the Pope “We were affected by the traffic. It took us five hours. I asked why, they said it was closed. I asked who is coming. They answered, the pope. I wanted to call him: ‘Pope, son of a wh**e, go home. Do not visit us again’” AFP/Getty Images The most controversial quotes from Rodrigo Duterte Joke about rape “I saw her face and I thought, 'What a pity... they raped her, they all lined up. I was mad she was raped but she was so beautiful. I thought, the mayor should have been first” AFP/Getty The most controversial quotes from Rodrigo Duterte Insulting Barack Obama "Mr Obama should be respectful and refrain from throwing questions at me about the killings, or son of a bitch, I will swear at you in that forum" REUTERS The most controversial quotes from Rodrigo Duterte On Abu Sayyaf Islamic militants "If I have to face them, you know I can eat humans. I will really open up your body. Just give me vinegar and salt, and I will eat you. If you annoy me to the fullest... I will eat you alive. Raw" EPA

Edre Olalia, president of the National Union of People’s Lawyers, criticised the police’s version of events and, saying they were “too contrived”.

“A search warrant in a government prison facility is unnecessary and appears to be a flaccid attempt to make the apparent rubout ‘legal’," Mr Olalia told local broadcaster TV5. “Such acts... insult ordinary common sense….There is going to be a lot of explaining to do.”

In addition, an anti-crime watchdog has called for an investigation of the circumstances of the killings, wondering how the mayor and the other inmate got hold of guns and what prompted them to clash with police while in detention.

Eastern Visayas Regional Police Chief Superintendent Elmer Beltejar said: “As a matter of procedure, this incident will undergo investigation to establish the facts and circumstances surrounding the incident.”

The mayor was the father of Kerwin Espinosa who Philippines officilas have alleged to be a drug lord. Kerwin was arrested by police in Abu Dhabi in October and the Philippine authorities are seeking his return.