Twenty soldiers were wounded Friday in an hours-long gunbattle between troops and Al-Qaeda-linked Abu Sayyaf extremists blamed for beheadings and kidnappings in the southern Philippines, the military said.