Lt-Gen Corleto Vinluan, commander of the Western Mindanao Command, said the shootout broke out around 2 a.m. local time when a team of soldiers and police swooped down on the suspects' hideout in Jolo town.
"Sensing the presence of the operating troops, the (suspects) opened fire, thereby prompting the government forces to retaliate," Vinluan said in a statement.
The four died at the scene, Vinluan said, adding that troops also recovered an M653 Carbine, a caliber .45 pistol, and components for improvised explosives.
Vinluan said the suspects from Abu Sayyaf Group were allegedly involved in a series of kidnappings and murders of foreign and Filipino victims in the Mindanao region and Malaysia.
The military has launched on-and-off offensives against the Abu Sayyaf Group, a loose band of about 200 militants.
The group has carried out deadly bombings and kidnappings in the remote and poor southern Philippine provinces of Sulu and Basilan. - Xinhua