The Ugandan government and the Lord's Resistance Army have signed a permanent ceasefire, the latest step aimed at ending more than two decades of war.
Millions have been displaced by decades of conflict
It will come into effect 24 hours after the signing by both sides of a comprehensive peace deal, which it is hoped will be achieved later this week.
The rebels and government have been holding talks in Juba in Sudan.
On Friday, they struck a deal allowing rebels to be considered for government, diplomatic and military posts.
"We signed a permanent ceasefire agreement at 1400 hours (1100 GMT). This is another major breakthrough," Captain Chris Magezi, spokesman for the government delegation, told AFP.
The former President of Mozambique, Joachim Chissano, who is mediating the talks described the latest agreement as the end of the war.
Peace negotiations have been taking place for more than 18 months. The BBC's Sarah Grainger in Uganda says that although progress was slow at first, with the agreements of the last few days, a final deal could be just around the corner.
The 20-year rebellion by the LRA in northern Uganda left thousands of people dead and nearly two million displaced.
The government has given the LRA until 28 February to end the war.
LRA fighters will not automatically keep their army ranks
The terms of the ceasefire prohibit any recruitment or rearmament by the LRA or movement beyond an assembly area in southern Sudan.
The agreement also creates a 10km (6.2 mile) deep buffer-zone around the LRA assembly area, guarded by southern Sudanese troops.
This final ceasefire will come into effect once a comprehensive peace agreement is signed.
It will replace the series of cessation of hostilities agreements that the government and the LRA rebels have renewed throughout the peace talks and which have largely restored security across northern Uganda.
The pace of the peace talks has increased significantly in the last week, our correspondent says.
The only remaining issue to be dealt with is the demobilisation of LRA fighters and their integration into the Ugandan army.
The government has agreed to consider people from the conflict-affected areas for appointment to top political and diplomatic positions.
Former LRA combatants will be assessed for rank and experience before being integrated into the army.
On Tuesday, the two sides finalised an deal over justice and accountability for war crimes, which had been a major obstacle.
A special division of the Uganda High Court will be set up to try those accused of serious crimes.
The rebels hope this means their leaders will not be prosecuted by the International Criminal Court, which has issued arrest warrants for three of them.