Armed mountain tribesmen have taken 57 people hostage after raiding an primary school and nearby homes in the troubled southern Philippines.

The raid comes less than three weeks after a massacre in a nearby province in which 57 people were killed, adding to tensions ahead of presidential elections next year.

The hostages are being held in a mountainous area near the town of Prosperidad in Agusan del Sur province.

Police said the gunmen had seized 75 people, but later freed 18, including 17 children.

Authorities described the gunmen as former members of a civilian militia who had taken to banditry.

Some officials said they could have taken hostages because they were being pursued by police after a gun battle with a rival tribal group yesterday.

Other officials said the group was demanding the dropping of cases against them, action against the rival group and media coverage.

Lino Calingasan, regional police chief, said all remaining hostages were adults and that negotiations are ongoing.

Last month, 57 people, including 30 journalists, were killed after being stopped at a checkpoint in Maguindanao province while on their way to file a candidate's nomination for elections.

The killings prompted a crackdown in the generally lawless southern Philippines and the imposition of martial law in Maguindanao last week.

Bandits, communist guerrillas and Islamic rebels operate widely throughout Mindanao - a southern island and region which contains Maguindanao.

In addition, powerful local families maintain large private armies and feuding among them is common.

Clan rivalry was at the root of last month's massacre.

The government has armed many villagers and formed civilian militias to counter the communist and Muslim rebels. Analysts say clan wars pose a threat to a fragile four-year truce between the government and Muslim separatists.