Philippine President Benigno Aquino is on the brink of an accord to end one of Asia's longest and deadliest rebellions, but renegade guerrillas, hostile politicians and the nation's highest court lie in potential ambush.
After completing negotiations last month, Aquino is expected to sign within weeks a final peace deal with the Moro Islamic Liberation Front (MILF) for a power-sharing arrangement with the nation's Muslim minority in the south.
In a process patterned on the 1998 Good Friday accord that ended the Northern Ireland conflict, the MILF would then gradually disband its 12,000-member force and put its weapons "beyond use".
If successful, the accord would end a conflict that began in the 1970s, claimed an estimated 150,000 lives and condemned large parts of the fertile southern Philippines to violence-plagued poverty.
The Philippines' Muslim population of about five million people regard the south as their ancestral homelands, and the MILF has led the armed quest for independence or autonomy.
But, after 18 years of stop-start negotiations that produced repeated false dawns, even Aquino's peace chiefs are warning that the toughest stages are yet to come.
"We can expect that there will be a lot of difficulties," said university professor Miriam Ferrer, who led the government negotiators.
"If the negotiations were hard, so much more the implementation."
- Neutralising the spoilers -
As the process gets under way, the government will need to stamp out the threat of other armed groups in the still-largely lawless region who oppose peace.
An MILF splinter group that still wants independence, the Bangsamoro Islamic Freedom Fighters (BIFF), has a deadly history of trying to derail peace efforts.
It may only have a few hundred armed followers, but in 2008 it attacked Christian towns across the south in an effort to destroy a previous peace plan, leaving more than 400 people dead and displacing 750,000 others.
Immediately after negotiations with the MILF ended last month, security forces launched an assault against the BIFF in which 53 of its fighters and a soldier were killed.
"Neutralising the BIFF will be a big help to the autonomous political entity. It would be one headache less with the spoilers taken out," regional military spokesman Colonel Dickson Hermoso told AFP.
However, the BIFF continues seeking to attract MILF members unhappy with the peace plan, while there are other rival groups who feel excluded from the process and remain a threat.
One is the MILF's rival Moro National Liberation Front (MNLF), which signed a peace deal in 1996 that is regarded by Aquino as a failure.
MNLF founder Nur Misuari's followers attacked the southern port of Zamboanga in September last year in an effort to wreck the peace talks, leaving more than 220 people dead.
Amid this backdrop, convincing the MILF to give up their weapons, a task to be supervised by a neutral body of foreign experts, is expected to be one of the toughest challenges.
Misuari's men never gave up their arms, allowing the region to suffer from banditry and political warlords with their own private armies.
- Problems with power-sharing -
Tensions are expected to be nearly as high in Manila, where Congress must swiftly pass a "basic law" creating the Muslim self-rule area.
This would cover about 10 percent of the mainly Catholic nation's total land, with its own police force, a regional parliament and power to levy taxes -- all powderkeg issues.
"Congress is the main battleground. Congress can make or unmake things," said Steven Rood, country director for the US-based Asia Foundation and a member of a monitoring team invited by the negotiators to observe the peace process.
Political analyst Rommel Banlaoi also warned some Christian politicians from the planned autonomous region were hostile to the idea of power-sharing as this would dilute or destroy their power bases.
"Some congressmen do not believe in the peace agreement and will reject (the proposed law)... or will find ways to delay the whole thing," Banlaoi, president of the Philippine Institute for Peace, Violence and Terrorism Research, told AFP.
Opponents are also widely expected to challenge the creation of a Muslim autonomous region in the Supreme Court.
Aquino need only look back to 2008, when his predecessor Gloria Arroyo's bid to strike peace with the MILF crumbled at the Supreme Court, to know that everything can still unravel.
The Supreme Court ruled a draft deal that would have handed over large areas of the south to MILF control was unconstitutional, in a verdict that led the group to break off peace talks.
However Teresita Deles, Aquino's chief adviser on the peace process, said the government was confident it would be able to defend the deal against any legal challenge.
Aquino had warned his negotiators to "learn lessons from the past" and offer only concessions allowed by the Philippine constitution, Deles told reporters.
Aquino has only a narrow window in which to deliver his end of the bargain before his single six-year term ends in mid-2016, with no certainty his successor will share his vision.
That means Congress must pass the law by next year, to be ratified in a referendum within the succeeding four months by voters within the planned autonomous region.
Despite all the obstacles, the government and others involved in the process are cautiously optimistic that peace will be achieved.
"The timetable is definitely tight, but doable," the Asia Foundation's Rood said.