A majority in the Senate and the House of Representatives - with 240 voting to approve and 27 opposing - backed the extension of martial law across the Mindanao region through the end of 2018. The vote followed warnings by Defense Secretary Delfin Lorenzana and other officials that IS-linked militants were trying to recover from their defeat in southern Marawi city and were plotting new attacks.
"The rebellion has not stopped, it has just moved to another place," Lorenzana told lawmakers in a special joint session.
Duterte thanked Congress in a speech at an army ceremony where hundreds of rifles and other weapons used by the extremists in Marawi were destroyed with a road roller. Asked by reporters about the prospects of martial law being imposed nationwide, the president said it cannot be ruled out if the country's survival is at stake.
"You threaten the existence of the Republic of the Philippines, I am sure that everybody will react and do what he must do to prevent it," he said.
A number of lawmakers from the south backed martial law, saying it would prevent a repeat of the bloody Marawi siege and foster the Islamic city's rebuilding.
Five months of intense fighting, including daily airstrikes and artillery bombardments by the military against hundreds of militants, left more than 1,100 combatants and noncombatants dead and displaced about half a million people, turning mosque-studded Marawi's central business and residential districts into a smoldering war zone.
Lorenzana said it would take at least three years to rebuild Marawi, a bastion of Islamic faith in the predominantly Roman Catholic Philippines.
Opponents argued that extending martial law in the south is unconstitutional because it's an "extreme measure" that can only be imposed when actual rebellions against the government exist. They expressed fears that such a move can be a prelude for Duterte to declare martial law throughout the Philippines.
Sen. Francis Pangilinan, who heads the main opposition Liberal Party, rejected the martial law extension, saying it did not have a clear constitutional basis. He cited the government's declaration that the terrorists have been defeated in Marawi, and said that major rebel attacks have been dealt with by past presidents without resorting to martial rule.
"We will be in danger of becoming the monsters that we seek to defeat, those who have no regard for law, order or respect for the constitution," Pangilinan said.
Opposition Rep. Tom Villarin said the remaining threats posed by Muslim militants in the south could be addressed by law enforcers without martial law and added that scheduled local elections in the south could be endangered by Duterte's declaration. Another opposition legislator, Edgar Erice, warned that the Philippines risks being regarded as a "banana republic" if officials flaunt the constitution.
Asked by a lawmaker what difference martial law will make, military chief of staff Gen. Rey Leonardo Guerrero acknowledged that it would not give any "power tactically to troops," but argued that "it provides the environment for us to succeed."
The Marawi uprising, which began on May 23, prompted Duterte to declare martial law to deal with his worst crisis so far. It also reinforced fears that the Islamic State group was taking steps to gain a foothold in Asia and elsewhere as it faced battle setbacks in Syria and Iraq.
Some gunmen and commanders escaped during the Marawi fighting and are recruiting new militants and plotting new attacks, the military says. Extremist groups in other southern provinces, including the brutal Abu Sayyaf group, continue to pose threats.
Filipinos remain hypersensitive to threats to democracy and civil liberties more than three decades after they ousted dictator Ferdinand Marcos in a 1986 "people power" revolt that became a harbinger of change in authoritarian regimes worldwide.
Concerns over Duterte's martial law have been sparked in part by his perceived authoritarian bent and the killings of thousands of suspects under a brutal crackdown against illegal drugs that he launched after taking office last year and which has alarmed Western governments and human rights groups.
Copyright 2018 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.