Philippine President Rodrigo Duterte was forced to cut short his diplomatic trip to Moscow as military forces clashed with militants who have been linked to the Islamic State group (ISIS), in the small town of Marawi, on the island of Mindanao, Philippines, on Tuesday.

By 10 p.m. local time (10 a.m. EDT), Duterte had ordered martial law to be imposed in Mindanao after the region was plagued by confusion and violence. The act was the fulfillment of a warning Duterte had issued days before the conflict broke out.

“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."

Philippine Defense Secretary Delfin Lorenzana, who had accompanied Duterte to Russia, informed him during a press conference that the confrontation started between government troops and Islamic extremists after the former tried to take Isnilon Hapilon into federal custody. Hapilon is a senior leader of the Abu Sayyaf Group that has been linked to the ISIS in the past. He is also one of the most wanted terrorists on FBI’s priority list.

Read: Philippines Taking South China Sea? Duterte Orders Troops To Build Structures In Disputed Islands

However, the military troops were unaware of the fact that Hapilon was being backed by “more or less 100 fighters,” among who were members of the Maute Group, another ISIS-related organization, Iowa Public Radio reported. 

A couple of soldiers and a police officer were shot dead in the gunfire that ensued while 12 others were severely injured. Several buildings including the city jail, a local Catholic church, and Dansalan college were set ablaze by the militants.

Horrifying pictures of burning buildings began circulating on the social media as more people became aware of the events taking place in the Philippines.

Merriam Webster defines the term “martial law” as “the law administered by military forces that is invoked by a government in an emergency situation when the civilian law enforcement agencies are unable to maintain public order and safety.”

In the wake of the martial law, local residents of Marawi City have been told to refrain from stepping out of their houses until the situation is brought under control and the military rule is lifted. Additional law reinforcement officials have been summoned from the neighboring areas to assist in the anti-militant operation.

In the meantime, "the whole of Marawi City is blacked out," Lorenzana said, as the militants continue to occupy a central part of the city.

While the military restrictions have been set in place for 60 days at present, Duterte mentioned on Tuesday that he was willing to extend the duration of the Martial Law for one year, if needed.