"As of 10:00pm Manila time Duterte has declared martial law for the entire island of Mindanao," spokesman Ernesto Abella said in a nationally televised briefing.
"As of 10:00pm Manila time Duterte has declared martial law for the entire island of Mindanao," spokesman Ernesto Abella said in a nationally televised briefing from Moscow where the president was on an official visit.
Abella said martial law would be in place for 60 days.
Mindanao is made up of a large islands of the same name, plus a number of smaller islands, and the region makes up roughly one third of the country. He later clarified martial law applied to all of the Mindanao region.
Abella said Duterte would cut short his trip to Moscow and return to the Philippines.
The announcement came after security forces battled dozens of gunmen in a built-up area of Marawi, a city of about 200,000 people in Mindanao, on Tuesday. Marawi is about 800 kilometres (500 miles) south of Manila, the capital.
At least one policeman was killed in the clashes, which began when police and soldiers raided a house where they believed Isnilon Hapilon, a leader of the infamous Abu Sayyaf kidnap gang and Philippine head of the Islamic State group, was hiding.
Photos posted on social media by residents showed the gunmen walking through the streets of Marawi and placing a black flag that looked similar to those used by IS.
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 militants beheaded 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 terrorist attacks, including the 2004 bombing of a ferry in Manila Bay that claimed more than 100 lives.
The US State Department bounty for Hapilon was offered following alleged terrorist acts against US citizens, including the 2001 kidnapping of three Americans in the western Philippines -- two of whom were later killed.
Security analysts say Hapilon has been trying to unite Filipino militant groups that have professed allegiance to IS.
These include the Maute group, which is based near Marawi, hundreds of kilometres to the north of the Abu Sayyaf strongholds.
The Maute group has engaged in repeated deadly battles with the military over the past year in rural areas around Marawi.
Duterte had said on many occasions he was prepared to declare martial law to quell the terrorism threat.
The Marawi fighting came six weeks after the military foiled a mass kidnapping attempt by the Abu Sayyaf on the central resort island of Bohol.
The US and other Western governments also warned this month that terrorists plan to kidnap foreigners in tourist hotspots in Mindanao and the central Philippines.