MARAWI, Philippines -- Army tanks packed with soldiers rolled into a southern Philippine city Thursday to try to restore control after ISIS-linked militants launched a violent siege that sent thousands of people fleeing for their lives and raised fears of extremists gaining traction in the country.

At least 21 people have died in fighting that erupted late Tuesday, when the army raided the Marawi hideout of Isnilon Hapilon, who is on Washington's list of most-wanted terrorists and has a $5 million bounty on his head.

But the operation quickly went wrong. Militants called in reinforcements and swept through the streets, torching buildings, taking a Catholic priest and his worshippers hostage and sealing off much of the city to the outside world.

There was no immediate word on Hapilon's whereabouts, but there was no indication he had been captured.

President Rodrigo Duterte declared 60 days of martial law on Tuesday across the southern third of the nation, an area that includes Marawi but extends well beyond it. Mindanao is home to 22 million people.

Get Breaking News Delivered to Your Inbox

Duterte also warned that he may expand marital law nationwide.

Much of Marawi was still a no-go zone Thursday. Automatic gunfire and explosions could be heard in the distance and plumes of black smoke rose from the direction of the city center. Air force helicopters swooped overhead.

"At night we can hear the gunfire," said Mohammad Usman, 49, who was among thousands of residents streaming out of the city, jamming their belongings into cars. "I'm just praying that the bullets will not find its way to my house and hit us. I hope that the bombs will not land nearby and harm us."

Even though much of the city was sealed off, disturbing details were emerging.

Duterte said a local police chief was stopped at a militant checkpoint and beheaded. Military chief of staff Gen. Eduardo Ano said the militants erected ISIS flags at several locations. And Marawi Bishop Edwin de la Pena said the militants forced their way into the Marawi Cathedral and seized a Catholic priest, 10 worshippers and three church workers.

Duterte has repeatedly threatened to place the south, the scene of decades-long Muslim separatist uprisings, under martial law, which allows him to use the armed forces to carry out arrest, searches and detentions more rapidly. But human rights groups and others have expressed fears that martial law powers could further embolden Duterte, who already has been accused of allowing extrajudicial killings of thousands of people in his crackdown on illegal drugs.

"We are gravely concerned that the declaration of martial law in Mindanao might lead to more extrajudicial killings and other cases of human rights violations," said Teddy Casino, a former member of the House of Representatives.

Hapilon, an Arabic-speaking Islamic preacher known for his expertise in commando assaults, pledged allegiance to ISIS in 2014. He is a commander of the Abu Sayyaf militant group and was wounded by a military airstrike in January.

Another, smaller militant group -- the Maute -- was also involved in the Marawi siege. The Maute is one of less than a dozen new armed Muslim groups that have pledged allegiance to ISIS and formed a loose alliance, with Hapilon reportedly designated as the alliance's leader.

The group has been blamed for a bombing that killed 15 people in southern Davao city, Duterte's hometown, last September and a number of attacks on government forces in Lanao, although it has faced setbacks from a series of military offensives.

Last month, troops backed by airstrikes killed dozens of Maute militants and captured their jungle camp near Lanao del Sur's Piagapo town. Troops found homemade bombs, grenades, combat uniforms and passports of suspected Indonesian militants in the camp, the military said.