Philippine troops were locked in a standoff with hundreds of Muslim gunmen who killed six people and took at least 20 hostages in the south on Monday in a bid to derail peace talks.
Armoured troops surrounded the southern port city of Zamboanga after between 200 and 300 Moro National Liberation Front gunmen entered six coastal villages on its outskirts before dawn, military spokesman Lieutenant-Colonel Ramon Zagala said.
"They were trying to march on the city hall and we cannot allow that," he told a news conference in Manila, adding that two gunmen were arrested.
President Benigno Aquino's government denounced the deadly attack, which analysts said was designed to sabotage peace talks aimed at ending a 42-year-old rebellion that has claimed 150,000 lives.
"The authorities are responding to the situation in a manner that will reduce the risk to innocent civilians and restore peace and order to Zamboanga City at the soonest possible time," Aquino spokesman Edwin Lacierda said in a statement.
Loud explosions could be heard around the former colonial Spanish port of nearly one million people.
Streets were deserted and shops, schools and government offices as well as the airport were shut down.
Heavily armed private security personnel as well as troops guarded the airport, hotels, banks and other buildings, said an AFP reporter on the ground.
"We can still hear sporadic gunshots. We don't know if this is from the government forces or from the MNLF," city hall employee Ramon Bucoy said.
Zamboanga mayor Maria Isabelle Climaco-Salazar said two security forces and four civilians had been killed and 1,500 people fled their homes.
The military and police said at least 20 people had been taken hostage.
Footage on local ABS-CBN television showed armoured personnel carriers speeding around empty
The attack came as the government and the Moro Islamic Liberation Front prepared to resume talks aimed at crafting a political settlement to be signed before Aquino leaves office in 2016.
After a preliminary peace deal was signed last year, the remaining negotiations aim to flesh out the power-sharing terms between the national government and the MILF that is expected to head a new autonomous government, and the disarmament of its 12,000 guerrillas.
Rommel Banlaoi, executive director of the Manila security think-tank Philippine Institute for Peace, Violence, and Terrorism Research, which has extensively covered the conflict, said the action was likely designed to sabotage the peace talks.
"[MNLF leader Nur] Misuari's motive is to convey a message…[that] the signing of the peace agreement between the government and the MILF will no longer guarantee the end of war."
He added: "The fear now is Misuari could create one united front along with other threat groups against the Philippines."
Misuari had made a renewed call last month for an independent Islamic state in the southern Philippines.
"To the Philippine government, I think our message is already quite clear — that we don't like to be part of the Philippines anymore," Misuari said in his message last month, a copy of which was obtained by AFP.
He called on his forces to "surround and secure all military, police and all other installations, airports, seaports and all other vital government and private institutions."
The MNLF signed a peace deal in 1996, dropping its bid for independence and settling for autonomy, although its followers had not totally disarmed.
The government later said the agreement was a "failed experiment" with many areas remaining in deep poverty.
It is not the first time Misuari has attacked Zamboanga.
In 2001, he and his followers took dozens of hostages and left many more dead in Zamboanga and in nearby Jolo island, his home base.
The MNLF later freed all the hostages after several days, in exchange for free passage out of the city as Misuari fled to Malaysia, where he was arrested and deported.
He was held in a police camp near Manila until 2008, when the government dropped all charges against him.