MANILA, Oct. 20 (Xinhua) -- Philippine President Rodrigo Duterte has no plans of lifting martial law in Mindanao in the southern Philippines despite the "liberation" of Marawi City from the clutches of pro-Islamic State (IS) extremists, a government statement has said.

Duterte said on Thursday night that the martial law will stay until all terrorist groups in the southern region are neutralized.

"When the time came, I declared martial law. Everybody is asking when will it stop? It will not stop until the last terrorist is taken out," Duterte said at a business conference event.

Duterte said martial law is needed to guarantee the safety of Filipinos in Mindanao.

"He echoed the military and the police's warning that terrorists may continue to retaliate even as the top leaders of the Maute terrorists had been neutralized," Duterte's office said in a statement.

The statement further read, "As such the president stressed that martial law would continue to prevail in the region."

Duterte imposed martial law on the entire Mindanao region when the Maute and Abu Sayyaf militants took over Marawi on May 23. The conflict dragged on for nearly five months and has so far killed more than 1,000 people, including 163 government forces, and wounded more than 1,700 others.

On Tuesday, Duterte declared to have liberated the ruined city from the IS-linked militants. But firefight continued as troops flush out the remaining 30 rebels and try to rescue the remaining hostages.