A Catholic priest and churchgoers have been taken hostage by Isis-linked militants attempting to seize control of a city in the Philippines, while the local police chief has been beheaded.

President Rodrigo Duterte has declared martial law on the island of Mindanao, where militants have taken over much of the largest city of Marawi, and cut short a state visit to Moscow in order to return to Manila.

While details of events from inside Marawi remained hazy after militants cut off electricity, gunmen are believed to have forced their way into a cathedral and seized the Rev Chito Suganob, alongside more than a dozen members of his congregation and staff, as fighting continued to rage with government troops.

Archbishop Socrates Villegas, president of the Catholic Bishops Conference of the Philippines, said the gunmen have threatened to kill the hostages “if government forces unleashed against them are not recalled”. He asked Filipinos to pray for the captives, and for the government to make their safety a primary concern.

Mr Duterte revealed upon his arrival back in Manila that the police chief was stopped at a checkpoint set up by the militants and murdered.

"We are in a state of emergency," he declared. "I have a serious problem in Mindanao and the Isis footprints are everywhere."

Mr Duterte said the southern Mindanao island and its 22 million residents would be under military rule for up to a year if necessary, and warned that if the violence spread to the mainland, so too could the emergency measures. Martial law allows Mr Duterte to use the armed forces to carry out arrests, searches and detentions more rapidly, but human rights groups fear the powers could further embolden the President, who has previously boasted of extrajudicial killings during a crackdown on illegal drugs.

“To my countrymen who have experienced martial law, it would not be any different from what President Marcos did. I'd be harsh,” he said in a video recorded on his return flight, referring to the 1970s rule of late dictator Ferdinand Marcos.

“If it would take a year to do it, then we'll do it. If it's over with a month, then I'd be happy. To my countrymen, do not be too scared. I'm going home. I will deal with the problem once I arrive.”

Thousands have fled the city amid intense fighting between the army and up to 100 militants from the Maute group, part of a loose alliance of militant groups which pledged allegiance to Isis in 2015. The fighters appear to have reacted to a botched security raid on a hideout belonging to Isnilon Hapilon, a commander of the Abu Sayyaf militant group and designated leader of the alliance.

Two soldiers and a police officer were among those killed and at least 12 people have been wounded in the violence, in which Maute fighters set fire to a school, a church and a prison.

Authorities insisted the situation was under control, but residents who fled Marawi said it was in the hands of the extremists, who had allowed civilians to leave.

“The city is still under the control of the armed group,” student Rabani Mautum told Reuters in nearby Pantar town, where some residents were leaving in overloaded trucks.

“They are all over the main roads and two bridges leading to Marawi.

“I was in school when we heard gunfire … when we came out there were bloodstains in the building, but we did not see dead or wounded."

Philippines: President Rodrigo Duterte’s 100 days in office

A photograph from one resident showed the black flag used as a symbol by Isis flying in Marawi, and other flags are believed to have been erected elsewhere in the city.

Alongside Abu Sayyaf, the Maute group is one of two major militias in the Philippines linked to Isis, which is attempting to intensify its presence in Asia.

But while Abu Sayyaf in particular has become notorious for piracy, banditry and the kidnapping and beheading of Westerners, some rights groups questioned the decision to declare martial law over an entire island, roughly the size of South Korea, to contain rebels in one medium-cized city.

Mr Duterte has warned repeatedly that Mindanao, an impoverished region beset by decades of unrest by separatist and Marxist guerrillas, was at risk of ”contamination“ by Isis fighters driven out of Iraq and Syria.

Armed forces spokesman Edgard Arevalo played down the prospect of a larger-scale conflict and claimed rebels were “merely courting the acclamation of Isis”.