The President said the influence of Islamic State remained one of the country's top security concerns and warned martial law could soon be extended across the Philippines.
It comes after he repeatedly threatened to place the south, the scene of decades-long Muslim separatist uprisings, under martial law.
TERROR ON THE STREETS
The violence in Marawi erupted on Tuesday after the army raided the hide-out of Isnilon Hapilon, a commander of the Abu Sayyaf militant group who has pledged allegiance to IS.
He is on Washington's list of most-wanted terrorists with a $5 million reward for information leading to his capture.
The militants called for reinforcements and around 100 gunmen entered Marawi, a mostly Muslim city of 200,000 people on the southern island of Mindanao, Defence Secretary Delfin Lorenzana said.
Rebels torched buildings, took a priest and his worshippers hostage and sealed off much of the city.
The violence forced thousands to flee and raised fears of growing extremism in the country.
At least 44 people have died in the fighting, including 31 militants and 11 soldiers, officials said.
President Rodrigo Duterte said a local police chief was stopped at a militant checkpoint and beheaded, and another policeman was also killed.
'PATH FOR ABUSE'
Human rights groups have expressed fears that martial law powers could further embolden Duterte, whom they have accused of allowing extrajudicial killings of thousands of people in his crackdown on illegal drugs.
The National Union of Peoples' Lawyers in Manila told the New York Times it appeared to be a sledgehammer, knee-jerk reaction".
"The recent incidents in Marawi do not justify the shotgun declaration of martial law," head of the lawyers' union Ephraim Cortez said.
"The declaration of martial law should be an option of last resort."
Human Rights Watch warned Duterte's declaration of martial law threatened to widen the scope of abuse.
Deputy Asia director at HRW Phelim Kine said while Maute and the Islamist armed group Abu Sayyaf threatened the security of people in parts of Mindanao, martial law was a drastic move.
"Duterte's martial law threatens military abuses in Mindanao that could rival the murderous 'drug war' in urban areas," Mr Kine said.
"It's crucial that the country's security forces abide by international law at all times and hold rights violators to account.
"Martial law is not a free pass for abuse."
HRW also said expanding the military's legal authority opened the door to increased human rights violations against civilians, "who have long been targets of military abuses".
'AUTHORITARIAN PATH'
Writing in Forbes, international politics, security and political risk expert Anders Corr said the move was extreme and warned Duterte is currently the biggest threat facing the country today.
Mr Corr, whose company, Corr Analytics, provides political risk analysis to commercial, non-profit and media, said Duterte had several other options available to deal with the militants who were nowhere near as powerful as Duterte made out.
"Duterte is on an authoritarian path," he wrote.
"He reveres the past dictator of the Philippines, Ferdinand Marcos, who ruled for 21 years and used torture and a brutal martial law to do so.
As Duterte insults US presidents Obama and Trump, he openly embraces China and Russia."
MARTIAL LAW POWER
Martial law allows Duterte to use the armed forces to carry out arrests, searches and detentions more rapidly.
The constitution only allows martial law for 60 days in the event of rebellion or invasion.
However Duterte has repeatedly threatened that he is willing to ignore the constitution if he needs to enforce martial law.
He also suggested it could spread even further, sparking fears he may use it to further his hold on power.
"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.
"It would not be any different from what President Marcos did. I'd be harsh."
Mr Lorenzana said that the military will have "control of movement, searches and arrest of detained people".
It also allows the military to supersede civilian authorities in enforcing the law and permits military courts to try civilians when civil courts are unable to function.
The move would enforce order and effectively allow the detention of people without charges.
MARCOS' LAW
Duterte warned he may expand martial law nationwide, which could prove a nightmare for many in the Philippines who lived through the rule of Ferdinand Marcos.
Marcos declared martial law in 1972 and used it to maintain power for more than a decade in which widespread human rights abuses occurred.
Marcos was ousted in a peaceful revolution in 1986 and died in exile three years later.