Seventeen rebels have been killed by Philippine army troops in a fierce gunfight in Maguindanao province in the troubled southern island of Mindanao.

The clashes reportedly lasted two days and pitted 1,500 troops against rebels with the Bangsamoro Islamic Freedom Fighters (BIFF).

Police were also attacked in three farming villages near the town of Datu Piang, when they tried to arrest rebel commanders.

Some reports suggested that violence erupted over the government's decision to sign a peace deal with a rival separatist movement, the Moro Islamic Liberation Front (MILF), which had been waging a rebellion against the state for several years.

The peace agreement, which involves the creation of an autonomous Muslim region, was signed hours before fighting broke out.

However, military spokesperson Col Dickson Hermoso insisted that the recent operation had nothing to do with the peace negotiations, but rather the offensive was launched due to the "excesses of the BIFF in North Cotabato and Maguindanao".

"I would like to correct the misimpression that the recently signed Normalisation Annex is connected with the operation," he told GMA News TV.

Hermoso claimed that clashes erupted when the police, backed by troops, went to arrest BIFF commanders who refused to accept court warrants.

He said BIFF was involved in extortion over an irrigation project in Pikit, Cotabato.

The spokesman also suggested that fighting was continuing in the farming villages where the police were attacked, albeit on a smaller scale.

Lt Col Ramon Zagala, army public affairs chief, said that the operation was conducted to battle lawless elements such as BIFF and other auxiliary groups that threaten the safety and security of the community.

Hermoso said that at least four other smaller rebel groups were a threat to the area.