The government of Burundi and the country's largest rebel group have finalized the last details of their peace deal to end Burundi's decade-long civil war. The two sides signed an agreement after several days of talks in South Africa.

South African President Thabo Mbeki said the two sides have agreed to dissolve Burundi's current transitional government, and reconvene a new one within three weeks. The transitional government will include Burundi's largest rebel group, the Forces for the Defense of Democracy (FDD).

The government and the FDD reached their landmark peace deal at talks in Pretoria last month. But several key issues were unresolved at those talks, and were not ironed out until the latest round of negotiations, which began Wednesday in the South African capital.

South Africa has been mediating in the conflict, and has deployed about 3,000 peacekeepers to Burundi.

Burundian President Domitien Ndayezeye and FDD leader Pierre Nkurunziza led their respective delegations at the Pretoria talks, and both men called the deal an important step toward peace.

The details they agreed on include distribution of army posts, turning the FDD into a political party, and granting temporary immunity from prosecution to combatants.

President Mbeki said the two sides failed to agree on the rebels' representation in the Senate, but decided to leave that issue unresolved for now, and go ahead with implementing the rest of the deal.

The peace deal and the transitional government still do not include another major rebel group, the Forces for National Liberation, which has so far refused to negotiate.

Fighting has continued in Burundi, casting a shadow over hopes that the Pretoria deal will finally bring an end to the war.