Philippine President Rodrigo Duterte has declared martial law on the southern island of Mindanao after about 100 Muslim fighters laid siege to a major city following a deadly gun battle with government forces.
The emergency declaration took immediate effect and will last for 60 days, according to presidential spokesman Ernesto Abella, who made the announcement on Tuesday from Russia, where Duterte was on a scheduled four-day official visit.
The president "has already declared martial law for the entire island of Mindanao", Abella said.
"This is possible on the grounds of the existence of rebellion," he added.
Duterte cut short his trip to Russia, Foreign Secretary Alan Peter Cayetano said. "The president feels that he is needed in Manila as soon as possible."
Duterte met Russian President Vladimir Putin on Tuesday night rather than Thursday as planned, according to Russian state media.
The president said on Wednesday martial law could last a year as he vowed it would be similar to the late Ferdinand Marcos dictatorship.
"To those who have experienced martial law, it would not be any different from what president [Ferdinand] Marcos did," Duterte said. "I'll be harsh."
"If it would take a year to do it, if it's over within a month, then I'd be happy," Duterte said in a video posted online by the government.
Two soldiers and one police officer were killed in the firefight in the city of Marawi, 816km south of Manila, while 12 government forces were wounded, Defence Secretary Delfin Lorenzana said.
The attackers reportedly burned a Catholic church, the city jail, and two schools, as well as occupied the main streets and two bridges leading to the city of more than 200,000 people, Lorenzana added.
Gunmen also occupied city hall, a state-run hospital, and part of a university compound, he said.
"The whole of Marawi city is blacked out, there is no light and there are [rebel] snipers all around," Lorenzana told a press conference in Russia's capital, Moscow.
The hostilities in Marawi began when troops raided an apartment where fighters were reportedly meeting, according army spokesman Lieutenant-Colonel Jo-ar Herrera.
Loyal to ISIL
The gunmen were suspected members of two armed groups - Abu Sayyaf and Maute - which have pledged allegiance to Islamic State of Iraq and the Levant (ISIL, also known as ISIS), Herrera said.
In the raid, security forces were targeting Isnilon Hapilon, an Abu Sayyaf leader.
Photos posted on social media by Marawi residents showed armed men roaming the city with the black flags of ISIL.
"Please pray for us here," said Mohammad Abedin, president of the Lanao Del Sur Medical Society in Marawi. "We can see houses burning and we don't have electricity now."
Lorenzana said additional forces would be deployed to Marawi on Wednesday.
Military chief General Eduardo Ano urged Marawi residents to stay indoors as fighting continued.
"Don't go out, lock your doors and windows until our troops clear the area," he said in an interview with a Manila radio station from Moscow. "We have enough troops on the ground."
Both Abu Sayyaf and Maute have been blamed for bombings, attacks against government forces, and kidnappings in the Philippines. They have also beheaded hostages .
Abu Sayyaf decapitated an elderly German early this year and two Canadians last year after ransom demands were not met.
It has also been blamed for the country's worst attacks, including the 2004 bombing of a ferry in Manila Bay that claimed more than 100 lives.
Security analysts said Hapilon has been trying to unite various Muslim armed groups that have professed allegiance to ISIL.
Hapilon reportedly has been chosen to lead an ISIL branch in Southeast Asia and is on the US Department of Justice list of "most-wanted terrorists" worldwide, with a reward of up to $5m for his capture.
Ano said Hapilon is still recovering from wounds sustained in a military air strike in January.
Source: News agencies