Updated

The United States Embassy issued a warning to U.S. citizens in a southern Philippine city on Wednesday after terrorists linked to the Islamic State swept through the region, beheading a police chief, burning buildings, seizing a Catholic priest and his worshippers and raising the black flag of ISIS, officials said.

The embassy suspended mission personnel travel to Mindanao as they analyzed the chaos that has left at least 21 people dead.

"While the U.S. Embassy has no information that the events in Marawi City represent a direct threat to U.S. citizens or U.S. interests in the Philippines, we encourage U.S. citizens to review personal security plans, avoid large crowds and gatherings, and remain vigilant at all times," the embassy said in a statement.

President Rodrigo Duterte declared martial law for 60 days across the southern third of the nation — home to 22 million people — and vowed to take tough action.

"We are in a state of emergency," Duterte said Wednesday after he cut short a trip to Moscow and flew back to Manila. "I have a serious problem in Mindanao and the ISIS footprints are everywhere."

He threatened to extend it to the whole country "in order to protect the people."

"If I think that ISIS has taken a foothold also in Luzon, and terrorism is not really far behind, I might declare martial law throughout the country," Duterte said Wednesday.

The violence erupted Tuesday after the army raided the hideout 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, Defense Secretary Delfin Lorenzana said.

DUTERTE DECLARES MARTIAL LAW

Duterte said a local police chief was stopped at a militant checkpoint and beheaded.

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.

The priest, Father Chito, and the others had no role in the conflict, said Archbishop Socrates Villegas, president of the Catholic Bishops Conference of the Philippines.

"He was not a combatant. He was not bearing arms. He was a threat to none," Villegas said of Chito. "His capture and that of his companions violates every norm of civilized conflict."

Villegas said the gunmen are demanding the government recall its forces.

DUTERTE BANS SMOKING IN PUBLIC

Military spokesman Col. Edgard Arevalo said 13 militants had been killed, and that five soldiers had died and 31 others were wounded. Other officials said a security guard and two policemen were also killed, including the beheaded police chief.

Arevalo said troops had cleared militants from a hospital, the city hall and Mindanao State University. About 120 civilians were rescued from the hospital, the military said.

Thousands of people have fled the city, said Mary Jo Henry, an emergency response official. She quoted another official as saying Marawi was like "a ghost town."

Broadcaster ABS-CBN showed people crammed inside and on top of public vehicles leaving the area, and some walking on foot with their belongings as they passed through a security checkpoint manned by soldiers.

Martial law allows Duterte to use the armed forces to carry out arrests, searches and detentions more rapidly. He has repeatedly threatened to place the south, the scene of decades-long Muslim separatist uprisings, under martial law. But 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.

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

Troops sealed off major entry and exit points to prevent Hapilon from escaping, military chief of staff Gen. Eduardo Ano told The Associated Press late Tuesday.

"We will conduct house-to-house clearing and do everything to remove the threat there. We can do that easily," Ano said, but added it was more difficult in an urban setting because of the need to avoid civilian casualties.

He said the group erected Islamic State flags at several locations.

Duterte met late Tuesday with Russian President Vladimir Putin and said he is counting on Russia to supply weapons for the Philippines to fight terrorism.

"Of course, our country needs modern weapons, we had orders in the United States, but now the situation there is not very smooth and in order to fight the Islamic State, with their units and factions, we need modern weapons," he said, according to Russian state news agency Tass.

While pursuing peace talks with two large Muslim rebel groups in the south, Duterte has ordered the military to destroy smaller extremist groups which have tried to align with the Islamic State group.

At least one of those smaller groups, the Maute, was involved in the Marawi siege. It's one of less than a dozen new armed Muslim groups that have pledged allegiance to the Islamic State and formed a loose alliance, with Hapilon reportedly designated as the alliance's leader.

Political analyst Ramon Casiple said the Maute is a clan-based group with members in Marawi who came to Hapnilon's assistance, with some directly assisting in the fighting and others fanning out to different parts of the city, setting up checkpoints and burning some buildings and taking hostages from the cathedral.

"It is difficult to root out because they are from there," he said. "The Mautes are embedded in the population."

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.

The Associated Press contributed to this report.