It was not immediately clear what set off the violence between the Sputnik and Commando gangs before dawn at New Bilibid Prison in metropolitan Manila.
Seven other inmates were wounded in the clash, Bureau of Corrections spokesman Gabriel Chaclag said. He said an investigation was underway and those who were involved in the fighting would be punished.
In 2005, 27 inmates, including detained Muslim militants from the brutal Abu Sayyaf group, and a police officer were killed when police commandos quelled a jail uprising in metropolitan Manila. Ten inmates, including two Chinese drug suspects, were killed in a 2016 grenade explosion in a jail in Paranaque city in the capital region.