Philippines - Tribal gunmen holding 46 hostages in the southern Philippines have reached an agreement with negotiators and will free all those in captivity, a government spokesman said on Saturday.

Alfredo Plaza, a spokesman for the Agusal del Sur provincial government, said the hostages would be freed at 7 a.m. Sunday (11 p.m. British time Saturday) and the gunmen would surrender.

They have agreed, Plaza told reporters. We are relieved this was resolved in a peaceful way.

Negotiators held discussions with the gunmen through the day on Saturday, officials had earlier said. It was not immediately known what they will get in return for freeing the hostages.

The gunmen took 75 people hostage from an elementary school and nearby homes in the lawless Mindanao region on Thursday, less than three weeks after a massacre in a nearby province, throwing an unwelcome spotlight on the Southeast Asian nation ahead of a presidential election next year.

The abductors have already freed 29 of the hostages.

Police have surrounded the area where the hostages are being held, in Agusan del Sur province, but said they were giving negotiations a chance.

We are optimistic that we can resolve this through negotiation, Senior Superintendent Nestor Fajura, operations chief of the regional police office, said on Saturday.

There is no threat on the lives of the hostages, they were fed and they freed one sick hostage, he told local radio. Our channels of communications are open.
The Mindanao region is full of bandits, communist guerrillas and Islamic rebels. Powerful local families maintain large private armies and feuding among them is common.

Last month, 57 people, including 30 journalists, were killed after they were stopped at a checkpoint in Maguindanao province, also in the southern Philippines, while on their way to file a candidate's nomination for elections next year.

The killings led to the imposition of martial law in Maguindanao last week, but it is set to be withdrawn at 9 p.m. (2100 GMT) on Saturday.

Negotiators had previously said the hostage-takers had demanded that murder cases against them be dropped. They have also asked police to disarm rivals from the same tribe, with whom they are feuding.

Clan wars, known locally as rido, are common in the south.

Studies funded by the Asia Foundation and the U.S. Agency for International Development in 2007 found there had been more than 1,200 clan feuds in the south since the 1930s, killing nearly 5,000 people and displacing tens of thousands.

(Additional reporting by Manny Mogato; Editing by Raju Gopalakrishnan and Alex Richardson)