MANILA — At least 18 soldiers were killed and more than 50 wounded in a gun battle in the southern Philippines between government forces and the militant group Abu Sayyaf, military officials said Sunday.

Among the militants, the dead included a Moroccan bomb maker and the son of a rebel leader, the military said. It also said more than 20 rebels were believed to have been wounded, but offered no additional details.

The firefight took place on Saturday on the southwestern island of Basilan and lasted 10 hours, the military said. The day before, Abu Sayyaf had released Rolando del Torchio, a former Italian missionary turned restaurateur who was kidnapped from his pizzeria in the southern Philippine city of Dipolog in October.

At least 20 other foreign citizens are still being held by the group.

The military did not make a connection on Sunday between the release of Mr. del Torchio and the gun battle, other than that both involved factions of Abu Sayyaf.