The fighting erupted early Thursday when a group of suspected Abu Sayyaf rebels ambushed a military convoy in Indanan on Jolo Island, killing 10 soldiers and wounding two others, and continued into the night in neighbouring Maimbung where 15 soldiers and 27 rebels were killed, Philippine Army spokesman Col. Ernesto Torres said.
The military also believes at least two high-ranking rebels -- the close aide of one-armed Abu Sayyaf commander Radullan Sahiron and the son of Abu Sayyaf leader Umbra Jumadil alias Dr. Abu Pula -- died in the clash, Torres told Kyodo News.
''We will pursue the Abu Sayyaf relentlessly to give justice to our fallen comrades,'' Torres said, adding that about 400 Abu Sayyaf guerrillas are on the run amid mountain hideouts.
About 3,000 troops are trying to hunt them down.
The military blamed the Abu Sayyaf and ''rogue elements'' of the mainstream Moro National Liberation Front for Thursday's attack because firearms used in the attack are known to be used by an Abu Sayyaf commander.
But the MNLF, which signed a peace deal with the government in 1996, admitted to the attacks as retaliation for the deaths of five members in a separate clash Wednesday.
The group added that a boy was killed in the crossfire.
The military said the fighting on Jolo is not connected to the offensives the military has launched against Muslim rebels who killed 14 marines, 10 of whom were beheaded, during a nine-hour gun battle on July 10 on the neighbouring island province Basilan.
The Moro Islamic Liberation Front, the largest Muslim secessionist group in the country talking peace with the government, has admitted killing the marines, but it denied mutilating their bodies.
Peace negotiations between the government and the MILF have bogged down several times due to territorial disputes on what will compose a Muslim homeland and violations in the three-year cease-fire pact between the two sides.
Close family ties in Jolo and Basilan, the stronghold of secessionist Muslim rebels and extremist groups, also made membership in the MNLF, MILF and Abu Sayyaf groups overlapping, which has complicated peace talks and military offensives.
Often, military offensives against Abu Sayyaf, which is blamed for the country's worst terror attack that killed more than 100 people in 2004, end up involving members of all three groups.