Some of the inmates pretended to be sick and asked for medicine from two guards, whom they stabbed, Bureau of Prisons official Arturo Alit said.
The inmates took the guards weapons and raided a nearby armory, but police soon recaptured five of them, Alit said.
The four others still at large have been on trial on charges of robbery, theft and illegal drug possession.
Superintendent Eduardo Gador said the inmates had sparked a riot in the prison, which has 264 inmates, to cover their escape.
Officials said three rifles were later found abandoned near a school.
It was the 10th jailbreak this year in the country, where prisons are considered among the worlds most porous because of frequent escape attempts blamed on dilapidated facilities, corrupt guards and harsh prison conditions.
Last month, Abu Sayyaf members launched a botched jailbreak in Taguig, prompting police to storm the maximum security prison in a hail of gunfire that left 22 inmates dead. Cecille Suerte Felipe