ISIS' media wing, Amaq Agency, put out a statement announcing that "fighters of the Islamic State launch a wide-scale offensive on positions of Philippine troops in the city of Marawi."
Speaking from Moscow, Philippines Foreign Secretary Alan Peter Cayetano said that the violence in Mindanao, one of the Philippines' southernmost islands, was Duterte's priority, despite the high-profile visit to Moscow and St. Petersburg.
"(The Russians) understand that the security of the Filipino people, especially in Marawi and in Mindanao, is a priority," Cayetano said.
The outbreak of violence has prompted Duterte to declare martial law throughout both the city of Marawi and the wider island of Mindanao, of which Marawi is a part.
Clashes between government forces and the Maute group, an Islamist militant organization based in Mindanao, began in Marawi, a city of about 200,000 people about 2 p.m. local time Tuesday.
Presidential spokesman Ernesto Abella confirmed that the fighters had taken over several government buildings in the city, and had torched others, including a church, a school and the city jail. It was not clear from his statement how damaged the buildings were by the arson.
Mindanao is home to a sizable Muslim population, in contrast to the overwhelmingly Catholic remainder of the country.
The militants had reportedly taken over a medical center and replaced the Philippines flag with a black, ISIS-style banner.
Armed Forces of the Philippines (AFP) spokesman Lt. Col. Jo-Ar Herrera said that Isnilon Hapilon, the leader of the Abu Sayyaf Group, which has pledged allegiance to ISIS, was among the armed men.
Three government troops had died in the fighting, said Abella, and 12 were injured. Martial law was declared about 10 p.m. local time, and reinforcements were expected.
"Our operation is still ongoing in Marawi City and sporadic fighting is still continuing," a statement from the Armed Forces of the Philippines said.
"The joint AFP-PNP team that is after Isnilon Hapilon and his cohorts is determined to finish him off," the statement said.
Residents were sheltering in their houses overnight, said Abella. Social media users in the city posted photos online that claimed to show residents attempting to evacuate the city Wednesday morning.
Martial law will be in effect on the Muslim-majority southern Philippines island for 60 days "to suppress lawless violence and rebellion and for public safety," said Abella, according to PNA.
Under the 1987 constitution, the president has the ability to place the country under martial law. The period should not last more than two months.
However, Duterte says martial law in the southern Philippines could last a year.
"If it would take a year to do it, then we'll do it. If it's over within a month, then I'd be happy," Duterte said in a video posted on Facebook by Mocha Uson, the assistant secretary to the Presidential Communications Operation Office.
The country suffered 14 years of martial law under former dictator Ferdinand Marcos, who was ousted in a peaceful revolution in 1986.
During those 14 years, perceived opponents of Marcos were subjected to numerous human right violations, including imprisonment, forced disappearances and torture. Extrajudicial killings carried out by Marcos' secret police were also common.
Many young Filipinos have little or no knowledge of the period under Marcos, and life under martial law.
Terrorism has been a persistent problem in the southern Philippines, where Maute and Abu Sayyaf are based.