Gunfire erupted between Philippine security forces and militants in Marawi City in the mid-afternoon Tuesday. By the time the sun had set on the small southern city, President Rodrigo Duterte had declared martial law in the region and vowed to end his diplomatic trip to Moscow early.

In the hours between, violence and confusion consumed the community, as armed men linked with the Maute Group occupied the Amai Pakpak Medical Center and several other major buildings. Philippine Secretary Delfin Lorenzana, who is in Moscow with Duterte, told a news conference that militants even set fire to some of those buildings — including the city’s jail, a local Catholic church and Dansalan college.

YouTube

Lorenzana said the confrontation opened at about 2 p.m. Tuesday, when government forces attempted to arrest a senior leader of the Abu Sayyaf Group, an extremist organization with ties to the Islamic State. They had learned Isnilon Hapilon was in the area, but according to Lorenzana, the military had not expected him to be backed up by “more or less 100 fighters” — many of whom were members of another ISIS-linked organization, the Maute Group.

It was not a lapse in military intelligence that caused the clashes, Lorenzana said, but rather a failure to “appreciate” the intelligence collected.

Gunfights ensued, killing at least two soldiers and one police officer and injuring 12 other members of the security forces. Meanwhile, photographs purporting to show buildings aflame and black flags raised above public buildings hit social media.

Philippine authorities assert the situation is under control — though they have told residents in Marawi City to remain indoors and summoned reinforcements from neighboring regions to redouble their efforts to reclaim the city Wednesday morning.

For now, “the whole of Marawi City is blacked out,” Lorenzana said. “There is no light and there are Maute snipers all around.” He noted that militants still occupy a central street in the city.

Hapilon, the man whom Philippine soldiers had sought at the start of the operation, “allegedly served as deputy or second in command for the foreign terrorist organization, Abu Sayyaf Group,” according to the FBI. The bureau has placed him on its own list of Most Wanted Terrorists.

Or, as Philippine Foreign Affairs Secretary Alan Peter Cayetano put it Tuesday: They are groups that “have been auditioning for recognition in ISIS.”

Presidential spokesperson Ernesto Abella said that as of 10 p.m. local time, Duterte had declared martial law for all of Mindanao, the southern island that has both Marawi City and Davao — the president’s home city — reside. The restriction, which suspends habeas corpus, is set to last about 60 days.

“Please do not force my hand into it. I hate to do it. I do not want to do it,” Duterte said in a speech last Friday in Davao, according to Rappler. “But if there will be loss of lives needlessly, and without reason, just to kill, kill, and kill, I will declare martial law in Mindanao.

“And if I declare martial law in Mindanao, I will solve all that ails the island.”