About 20 militants barged into a grade school compound in Sulu province’s Patikul town shortly after midnight Saturday and seized six painters and carpenters, one of whom managed to escape and alerted the police.

Suspected Abu Sayyaf gunmen abducted four workers in a school in a southern Philippine province where President Rodrigo Duterte visited troops waging an offensive against the militants, officials said on Sunday.

About 20 militants barged into a grade school compound in Sulu province’s Patikul town shortly after midnight Saturday and seized six painters and carpenters, one of whom managed to escape and alerted the police. Army troops later rescued another worker.

Mr. Duterte pinned medals on wounded troops during brief visit on Saturday to Sulu, a predominantly Muslim province about 590 miles (950 km) south of Manila. The tough-talking president has ordered government forces to destroy the ransom-seeking militants who still hold several foreign and Filipino hostages in Sulu’s jungles.

Fourteen inmates, including suspected Abu Sayyaf fighters and drug dealers, meanwhile escaped early Sunday from a jail in a new building that also houses the police headquarters in a government compound in Sulu’s main town of Jolo, officials said.

Three of those who escaped were gunned down by police and another was shot and captured. Army troops were helping police track down the rest with the use of military drones and sniffer dogs, a police statement said.

The new kidnappings and jailbreak reflect the diverse security challenges confronting Mr. Duterte’s administration in the south, where thousands of troops have been separately battling militants aligned with the Islamic State group who laid siege to Marawi city on May 23.

After 55 days of fighting, more than 530 people, including 399 militants and 93 soldiers and police, have died in the violence in the lakeside city, a center of Islamic faith in the southern third of the largely Roman Catholic country.

Troops, backed by airstrikes, are fighting less than 100 remaining militants, who are holding an unspecified number of civilian hostages in four Marawi neighborhoods in an offensive that Mr. Duterte said last week was winding down and may end in about 10 to 15 days. He said that the offensive won’t stop until the last militant is killed.