Major Ronald Suscano, spokesman for the army's 1st infantry division, said fighters from the Maute group, the biggest faction in the alliance, had managed to escape before the military retook Marawi City and killed the core leaders, in what was the country's biggest security crisis since World War Two.
The United States last week designated Maute as a terrorist group.
"They are regrouping, retraining and recruiting for another attack," Maj Suscano told reporters.
He said the rebels broke into smaller groups, with some slipping into the capital Manila to carry out bombings.
The Philippines is predominately Christian, but Muslim rebels in the south of the country have battled the government for years. Some of them have with links to international Islamist groups such as Al-Qaeda and ISIS.
Police said on Monday that two Maute rebels had been arrested near a train station in the crowded Tondo area of Manila. They were paraded before the media and, according to police, admitted being Maute members, but said they were in Manila to hide, not to launch attacks.
Philippine army chief Lieutenant-General Rolando Bautista said rebels had escaped the battle in Marawi with huge sums of cash looted from homes. That was helping to support their recruitment and re-arming for what could be another urban attack.
"There is still a possibility that they will occupy another city, that is a big possibility," Lt Gen Bautista told reporters.
Delays in the reconstruction of Marawi were helping the Islamists to recruit disgruntled residents, mostly poorly educated young men.
The head of the separatist Moro Islamic Liberation Front, which has a peace agreement with the government and vehemently opposes ISIS, on Monday reiterated his warning that militants were regrouping in the south.
He said last month the militants' plan was to take two southern cities, Iligan and Cotabato, with the help of foreign fighters driven out of Syria and Iraq.