Image copyright AFP Image caption Saturday's agreement was signed in the Malaysian capital, Kuala Lumpur

The Philippines has agreed the final section of a peace deal with Muslim rebels fighting a long-running insurgency in the south of the country.

It is the fourth part of a roadmap for peace with the Moro Islamic Liberation Front (MILF) set out in October 2012.

The accord details how the rebels will hand over their weapons in exchange for self-rule in parts of the south.

The agreement, reached in Kuala Lumpur, paves the way for a final and comprehensive peace treaty.

Image copyright Reuters Image caption The talks to end 40 years of conflict have been running since October 2012

Tens of thousands of people have been killed over the past four decades of separatist fighting.

The government's chief negotiator, Miriam Coronhel Ferrer, said the agreement marked the effective end of the formal negotiations.

Image copyright AFP It marks the beginning of the bigger challenge ahead... which is implementation Miriam Coronhel Ferrer, Government chief negotiator

"Some more finishing touches" would be necessary, she said, "but it also marks the beginning of the bigger challenge ahead, which is the bigger challenge of implementation".

'Pave for peace'

Her counterpart from the MILF, Monagher Iqbal, said certain steps had to be taken:

"To pave for peace, real peace in Mindanao, we have to decommission our forces and put them beyond use.

"As for the number of combatants that are involved in the decommissioning process - it's part of the verification and validation which will be undertaken by the independent decommissioning body."

The MILF, created after a split with another rebel group in 1977, originally wanted an independent Muslim state, but dropped this demand.

The Philippines has faced separatist movements for decades in Mindanao, where the MILF is based, and in Jolo, home to the radical Islamist Abu Sayyaf group, which is reputedly linked to al-Qaeda.

Communist rebels have also waged a guerrilla conflict over parts of the country from 1969.