The troops encountered about 30 armed members of the Abu Sayyaf Muslim extremist group in the southern island of Basilan, resulting in a four-hour gun battle, said Navy Captain Roy Vincent Trinidad, chief of a special security task force.
Three of the gunmen and one soldier were killed in the battle, which forced the Abu Sayyaf to retreat, leaving behind them bomb-making paraphernalia, Trinidad said.
"Various types of IEDs (improvised explosive devices) were recovered that were already assembled. Some were made of LPG (liquefied petroleum gas) tanks, paint tins and pipe bombs," he said.
This includes the 2004 firebombing of a ferry off Manila Bay that killed more than 100 people.
Despite receiving training assistance from the United States, the Philippines has struggled to contain the Abu Sayyaf, whose leader last year pledged allegiance to the Islamic State movement.