Rolando Espinosa, who was detained as part of the anti-drugs crackdown in the Philippines, was shot in his jail cell.
A Philippine mayor who was detained in the country's anti-drug campaign was killed during a shootout at a prison.
Rolando Espinosa, the mayor of Albuera town in the central island of Leyte, was accused by President Rodrigo Duterte of being involved in the illegal drugs trade.
He was the second high-profile local official to be killed in Duterte's ongoing anti-drug crackdown which has drawn widespread criticism from rights groups.
In August, Duterte urged Espinosa and his son, Kerwin, to surrender themselves to the national police over their alleged involvement in drug trafficking.
Espinosa turned himself in to the authorities, saying he feared for his life and was arrested last month.
Acting on a warrant on Saturday morning, police searched his cell for weapons and drugs but Espinosa was killed after he allegedly shot at officers.
"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.
He added that inmate Raul Yap, also accused of drug trafficking, was killed after he too fired at a team from the Criminal Investigation and Detection Group.
The national police said it was investigating the circumstances of the killings, wondering how the mayor and the other inmate got hold of guns and drugs and what prompted them to clash with police while in detention.
"As a matter of procedure, this incident will undergo investigation to establish the facts and circumstances surrounding the incident," Eastern Visayas Regional Police Chief Superintendent Elmer Beltejar said.
Some lawmakers expressed alarm over the killing of Espinosa inside his detention cell, with the chairman of the Senate committee on justice and human rights, Senator Richard Gordon, describing it as a "slap in the face" of the country's criminal justice system.
Gordon said he may file a resolution to look into such drug-related killings, while Senator Panfilo Lacson was quoted by local media as saying that Espinosa's death was "a clear case of EJK (extrajudicial killing)."
"There's got to be a lot of questions that must be answered," Gordon said in an interview with news channel ANC.
The presidential palace described Espinosa's death as "unfortunate" and said an investigation was ongoing.
Espinosa had publicly denied any part in the drug trade but said his son was peddling "shabu" (methamphetamine), which was allegedly being supplied by a jailed Chinese drug trader.
The mayor's son was arrested in the United Arab Emirates last month and is set to return to the Philippines to face drug trafficking charges.
Also in October, another town mayor, Samsudin Dimaukom, accused of drug trafficking was killed in the southern Philippines.
At least 4,000 people have been killed by police or vigilante groups since Duterte took office on June 30.