The military of the Philippines came under increased pressure Tuesday to rescue more than 20 foreign hostages after their captors beheaded a Canadian man, but troops face a dilemma in how to succeed and also ensure the safety of the remaining captives.

Abu Sayyaf gunmen beheaded John Ridsdel on Monday in the southern densely forested province of Sulu, sparking condemnations and prompting Canadian Prime Minister Justin Trudeau to pledge to help the Philippines pursue those behind the "heinous act."

Ridsdel's head, which was placed in a plastic bag, was dumped by motorcycle-riding militants Monday night in Jolo town in impoverished Sulu, about 950 kilometres south of Manila, where the Abu Sayyaf and allied gunmen are believed to be holding 22 foreign hostages from six countries.

It's a politically sensitive time to carry out major offensives — it's the height of campaign time in a close race between four contenders in May 9 presidential elections. President Benigno Aquino III and opposition politicians have had differences over the handling of the Muslim insurgencies and the poverty and social ills that foster it.

"The pressure on the armed forces is really immense," analyst Julkipli Wadi said.

The underfunded military has to contend with escalating territorial disputes in the South China Sea while dealing with Muslim and Marxist rebellions that have endured through several presidencies, fuelled by the poverty, neglect and desperation that have not been tamed by political leaders, Wadi said.

A large-scale offensive could displace many villagers and draw attention to the long-standing security and social issues in the vote-rich south, homeland of minority Muslims in the largely Roman Catholic nation.

That could play to the advantage of Rodrigo Duterte, the tough-talking city mayor from the south who has emerged as the front-runner in the presidential race by a lofty promise to end crime in six months and restore law and order. Aquino has endorsed another candidate, Mar Roxas, whose platform focuses on continuing the president's anti-corruption drive and economic reforms. All the presidential candidates condemned the beheading.

The Philippine military and police said "there will be no letup" in the effort to combat the militants and find the hostages, even though they have had little success in safely securing their freedom. Many hostages were believed to have been released due to huge ransom payments.

"The full force of the law will be used to bring these criminals to justice," they said in a joint statement.

Military general resigns

About 2,000 military personnel, backed by Huey and MG520 rocket-firing helicopters and artillery, were involved in the manhunt for the militants, who were believed to be massing in Sulu's mountainous Patikul town, military officials said.

While under pressure to produce results, government troops have been ordered to carry out assaults without endangering the remaining hostages, including in the use of airstrikes and artillery fire, a combat officer told The Associated Press by cellphone from Sulu. He spoke on condition of anonymity because he was not authorized to talk to reporters.

Amid the offensive, Brig.-Gen. Alan Arrojado resigned Tuesday in Sulu as commander of an army brigade "due to conflict of approach in addressing the Abu Sayyaf threats" in the province. Arrojado did not elaborate.

Among the 22 hostages are 14 Indonesians who were kidnapped from tugboats in two separate incidences. Indonesian President Joko (Jokowi) Widodo said Tuesday that his country will host talks with Malaysia and the Philippines this week to boost maritime security following those hijackings.

In past militant videos posted online, Ridsdel and fellow Canadian Robert Hall, Norwegian Kjartan Sekkingstad and Filipino Marites Flor were shown sitting in a clearing with heavily armed militants standing behind them. In some of the videos, a militant aimed a long knife on Ridsdel's neck as he pleaded for his life. Two black flags with ISIS-like markings hung in the backdrop of lush foliage.

Samal Island kidnapping

Philippine officials said the hostages were taken at gunpoint Sept. 19 during a raid on the Oceanview resort on Samal island, near Davao City, the largest city on Mindanao island in the southern Philippines. (Google)

The four were seized from a marina on southern Samal Island and taken by boat to Sulu, where Abu Sayyaf gunmen continue to hold several captives, including a Dutch bird watcher, who was kidnapped more than three years ago.

Abductions since 1990s

The killing drew swift condemnation from Prime Minister Justin Trudeau, who called it "an act of cold-blooded murder" and said Canada is committed to working with the Philippines and international partners to bring the group responsible to justice.

Trudeau outraged by killing of Canadian hostage1:24

In Canada, Ridsdel was remembered as a brilliant, compassionate man with a talent for friendship.

"He could bridge many communities, many people, many situations and circumstances and environments in a very gentle way," said Gerald Thurston, a lifelong friend of the former mining executive and journalist who grew up with him in Yorkton, Sask..

Thurston said Ridsdel is survived by two adult daughters from a former marriage.

The Abu Sayyaf began a series of large-scale abductions after it emerged in the early 1990s as an offshoot of a separatist rebellion by minority Muslims in the predominantly Roman Catholic nation's south.

It has been weakened by more than a decade of Philippine offensives, but has endured largely as a result of large ransom and extortion earnings. The United States and the Philippines have both listed the group as a terrorist organization.