MANILA : The Philippines said Sunday it was aiming swiftly to sign a final peace deal with Muslim rebels to end a rebellion that has killed tens of thousands, following a major breakthrough in talks.

Chief peace negotiator Miriam Coronel-Ferrer said the government could reach a final deal with the Moro Islamic Liberation Front (MILF) within weeks after both sides agreed on a wealth-sharing formula late Saturday. "This signing indicates that both sides are really committed to finish the peace negotiations. Nobody wants this not to reach its fruition," Ferrer told AFP after the wealth-sharing formula was signed. Under the deal, the government has agreed to let the rebels have a 75 percent share of earnings from natural resources and metallic minerals in a proposed autonomous region for the Muslim minority in the southern island of Mindanao, Ferrer said.

For energy resources, both sides agreed to split earnings equally following the talks hosted by neighbouring Malaysia.

"We are always optimistic, but that is always guided by a good sense of possibilities and constraints of our situation," she said, adding that the six days of gruelling talks nearly ended in a breakdown.

"It was a close call, but both parties' persistence and goodwill bore fruit," she said.

The government had initially bargained for a bigger share of the wealth, arguing that it wanted a deal that could withstand legal challenge in the Supreme Court.

Ferrer said a final peace deal with the 12,000-MILF could be signed after the Islamic holy month of Ramadan, which officially ends at the end of July.

Muslim groups including the MILF have waged a guerrilla war for a separate Islamic state in Mindanao since the 1970s, a conflict that has claimed an estimated 150,000 lives. President Benigno Aquino's government and the MILF signed a preliminary deal in October outlining the broad terms for a peace treaty that is expected to be signed before he ends his six-year term in 2016.

Ferrer, however, noted Sunday that both sides still had to agree on a formula over how to disarm the rebels as well as the extent of the powers of the autonomous region.

MILF vice chairman for political affairs Ghazali Jaafar said the group expected a "more contentious" round of negotiations ahead.

"The MILF fighters will not disarm unless clear conditions and terms for their safety are met," Jaafar told AFP. "There must also be an assurance the fighters will be free from harassment from troops once they are disarmed, if ever."

He said the rebels had originally wanted at least a 60-40 sharing scheme over energy resources, which include natural gas believed abundant in the south.

The proposed autonomous territory comprises areas the minority Muslims consider their "ancestral domain" in Mindanao, the country's main southern island believed to have a large chunk of the country's estimated $840 billion in gold, copper and other mineral reserves.

"Not all of us were totally satisfied with the outcome (of the talks)," Jaafar said.

Meanwhile, Ferrer warned that failure to reach a pact could be used by the small, violent breakaway faction the Bangsamoro Islamic Freedom Fighters (BIFF) as a justification to sow further violence.

"A failure of the agreement can by used by groups like the BIFF who do not want the process to succeed -- who say nothing will happen in these negotiations -- to agitate for war, and continue use of violence," she said.

The BIFF, believed to number fewer than 200 fighters and led by a hardline Islamic militant opposed to talks, broke away from the MILF in 2011. It has since been staging deadly attacks to derail the negotiations.

A skirmish Saturday, the latest to hit the region, left two soldiers and five BIFF guerrillas dead.