The Philippine army says rebels holding parts of the southern city of Zamboanga have been encircled after a week of fighting.
Rebels stormed the city on Monday, forcing an estimated 70,000 people to flee. The army said about 50 rebels have been killed and 40 others captured.
The gunmen were reported to have taken about 100 civilians hostage, but government officials say most have now been freed.
The rebels are thought to belong to one of a number of separatist groups. Their presumed leader, Nur Misuari, 71, has said little since the siege began.
The BBC reports a government attempt to broker a ceasefire apparently faltered because he wanted safe passage out of Zamboanga for the gunmen.
Analysts say he is angry because his faction of the Moro National Liberation Front has been sidelined in peace talks with the government.
Last month he declared a whole area of the southern Philippines to be an independent state.