Jailed Philippine human rights campaigner Leila de Lima was briefly taken hostage during an attempted breakout by three inmates who were shot dead by police, authorities said.
The incident happened on Sunday at the national police headquarters, where de Lima, a former senator, has been held for more than five years with other high-profile detainees.
One police officer was stabbed with an improvised knife before another officer shot dead two of the inmates, police said in a statement.
The third prisoner ran to de Lima's cell and briefly held the 63-year-old hostage before he was also shot dead.
Police said de Lima was not hurt and that the situation inside the detention facility had "returned to normal". An investigation was underway.
Police chief General Rodolfo Azurin told local radio station DZBB that de Lima did not appear to have been the target.
"They saw her as an ideal cover. Their intention really was to escape," he said.
Attempted breakout
The three inmates were reportedly members of a banned outfit Abu Sayyaf, which has been accused of killing several foreigners.
One of the three inmates stabbed a police officer who was delivering breakfast after dawn in an open area, where inmates could exercise outdoors.
A police officer in a sentry tower fired warning shots, and then shot and killed two of the prisoners, including Abu Sayyaf commander Idang Susukan, when they refused to yield, police said.
De Lima was unhurt, Boni Tacardon, her lawyer, confirmed.
"She was brought to the hospital for the standard medical check-up," Tacardon said. "But based on the information given to us by our staff who's with the senator now, she appears OK."
The police officer who was stabbed with an improvised knife was in serious condition at a hospital. Another inmate was injured in the rampage.