Philippine President Rodrigo Duterte said Wednesday martial law in the southern region of Mindanao could last a year, as he vowed it would be similar to the late Ferdinand Marcos's dictatorship.
"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.
Addressing "our fellow Filipinos", Duterte told them they had experienced martial law during the two-decade Marcos presidency, which ended with a "People Power" revolution in 1986.
"It could not be any different from what President Marcos did," he said in the video, which was recorded just before cutting short a visit to Russia and flying back to the Philippines.
Duterte vowed to be "harsh" in dealing with terrorism, telling Filipinos this was one of his election campaign promises last year.
"What I told everyone, do not force my hand into it. I have to do it to preserve the Republic of the Philippines, the Filipino people," he said.
Duterte on Tuesday night placed all of the southern region of Mindanao, which makes up roughly one third of the country and is home to 20 million people, under martial law, following deadly clashes between security forces and Islamist militants.
The constitution only allows martial law for 60 days in the event of rebellion or invasion.
Presidential spokesman Ernesto Abella initially said martial law in Mindanao would last for 60 days.
However Duterte, who has caused controversy with a war on drugs that has claimed thousands of lives, has repeatedly threatened throughout his presidency that he is willing to ignore the constitution if he needs to enforce martial law.
Duterte has also said he is willing to enforce martial law nationwide if it is needed to eradicate drugs in society.
However Tuesday's announcement restricted martial law to Mindanao.
The announcement came after security forces battled dozens of IS-linked gunmen in Marawi, a city of about 200,000 people in Mindanao, on Tuesday.
Marawi is about 800 kilometres (500 miles) south of Manila, the nation's capital.
Defence Secretary Delfin Lorenzana said one policeman and two soldiers were killed in the clashes, which began when security forces raided a house where they believed Isnilon Hapilon, a leader of the infamous Abu Sayyaf kidnap gang and Philippine head of IS, was hiding.
Photos posted on social media by residents showed the gunmen walking through the streets of Marawi and placing black flags that looked similar to those used by IS.
Lorenzana said the gunmen, who were believed to number more than 100, had occupied a hospital and a jail, and burned down buildings including a Catholic Church.
He said many were hiding in buildings as snipers, making it difficult for security forces to combat them.
The Abu Sayyaf, based on the most southern islands of Mindanao, has kidnapped hundreds of Filipinos and foreigners since the early 1990s to extract ransoms. The United States lists it as a terrorist organisation.