The military suspects members of the Abu Sayyaf and the Moro National Liberation Front (MNLF) to be behind the ambush.
Major Eugene Batara, a spokesman at the headquarters of the western Mindanao military command, said soldiers recovered five bodies of killed separatists but group members carried away the rest of the dead and wounded.
"The Muslims of the Philippines want autonomy and equal rights - democracy has failed them so they have taken up arms"
Shafiq, Dhaka, Bangladesh
Send us your views
Batara said Thursday's ambush did not indicate the Abu Sayyaf was regaining strength.
"They've been attacking our soldiers when they're not in battle mode," he told The Associated Press.
"They could not fight frontally. They're treacherous."
Jolo has witnessed a rise in violence after the army started collecting unlicensed guns from civilians.
Sakur Tan, the Sulu provincial governor, said he has instructed the mayors of Maimbung and Indanan to prepare evacuation centres for residents who may have to flee due to the conflict.
Members of the MNLF have been unhappy with the government for trying to sign a deal with the Moro Islamic Liberation Front (MILF), which broke away from the MNLF.
The MNLF, having signed a peace deal in 1996, said the government should first fulfil the obligations due to it.
The group claimed it was behind the ambush, saying it was in retaliation for the deaths of five people during an army offensive a day earlier.
"It was not the Abu Sayyaf," Hatimil Hassan, the deputy chairman of the MNLF, said on local TV. "It was our troops. It was the military's fault. They started it all."
Last month, members of the MILF, the country's largest Muslim separatist group, killed 14 soldiers in an attack on the nearby island of Basilan.
Many of the soldiers were beheaded but the MILF, which is meant to be in peace talks with Manila, has denied its members mutilated the troops.
The military blames members of the Abu Sayyaf for the decapitations.
Marga Ortigas, Al Jazeera's correspondent in the Philippines, said the situation in the southern Philippines was tense due to several groups vying for position and engaging the army in gun battles.
"On top of that, the army no longer seems to know who they are fighting. There is rampant lawlessness and a general fear among the general population. Thousands of people have had to leave their homes and are now living as refugees," she said.
Elusive peace deal
Due to family ties on Jolo and Basilan, there are close links between the Abu Sayyaf, the MNLF and the MILF and sometimes an overlap in membership.
The Philippine government wants to seal a peace deal with the MILF but has sworn to crush the Abu Sayyaf, which is blamed for the Philippines' worst attack - a ferry bombing that killed more than 100 people in 2004.
The islands of the southern Philippines, especially Jolo and Basilan, are hotbeds of separatist activity. They are also home to bandit and pirate gangs that prey on shipping in the South China sea.
About 13,000 Philippine troops are on the islands with the stated objective of rooting out about 2,000 fighters.
About 100 US special forces are also on Jolo island to help train the Philippine military, but they are technically forbidden from fighting under Philippine law.