At least 37 Islamist fighters have been killed in the Philippines in a two-day offensive against insurgents opposed to a new peace deal between the government and the main Muslim rebel group, according to the military.

President Benigno Aquino III said the military had launched the assault to protect villages after Bangsamoro Islamic Freedom Movement fighters staged attacks in southern Maguindanao province. Troops were aiming "to seriously degrade their abilities to again act as spoilers", Aquino told reporters.

The rebels involved in the fighting have opposed peace talks between the government and the larger Moro Islamic Liberation Front, which were concluded over the weekend in Malaysia. They said because the Malaysian-brokered talks would not lead to a separate homeland for minority Muslims in the south they would continue their armed uprising.

The regional military spokesman, Colonel Dickson Hermoso, said 12 of the rebels killed had been identified, with the help of village leaders; others had been buried in graves discovered by troops in and near a village in Maguindanao.

One soldier died and four others had been wounded by rebel bombs hidden around a mosque late on Tuesday, Hermoso said.

A rebel spokesman, Abu Misry, disputed the military report, saying there had been no deaths and only seven insurgents had been wounded in army shelling and helicopter rocket fire.

Hundreds of villagers fled the fighting, illustrating the difficulty of ending violence in the country's south.

Aside from the main Moro rebel group, which concluded negotiations on Saturday with the government for a new Muslim autonomy deal in the south, at least four other smaller insurgent groups threaten the peace in the region.

Those groups include the Bangsamoro Islamic Freedom Movement and the smaller but more violent Abu Sayyaf, which is notorious for bombings, kidnappings and beheadings.

Aquino said the new peace deal would bring the government and the 11,000-strong main Moro rebel group together to pursue outlaws.