The Ugandan government and the rebel Lord's Resistance Army have signed a truce aimed at ending one of the most bitter wars in Africa.
LRA leader Joseph Kony is wanted by the ICC for war crimes
The agreement, reached during peace talks held in Juba, southern Sudan, is expected to take effect on Tuesday. A final peace deal will then be sought.
Thousands have died during the 20-year conflict in northern Uganda, and more than one million have fled their homes.
Lengthy efforts to end the war have culminated in the peace talks in Juba.
Under the terms of the truce signed by both sides, the rebels will leave Uganda and their bases in Sudan and DR Congo to gather at two assembly points, where they will be protected by the government of southern Sudan.
The Ugandan government has promised that, once the truce is in place, it will not try to attack the rebels.
Talks on a comprehensive peace agreement will then get under way.
Ugandan President Yoweri Museveni has set a 12 September deadline for a final peace deal.
The LRA had already called a ceasefire, but Uganda had insisted that a comprehensive agreement - with the rebels providing details of their forces and deployment - needed to be in place before a ceasefire could be agreed.
The government also wanted a guarantee the LRA would not use the halt in fighting to reinforce its positions.
The International Criminal Court (ICC) wants the LRA's top officials - among them leader Joseph Kony - to face charges including murder, rape and forcibly enlisting children.
Against the wishes of the ICC, Uganda has offered amnesty to LRA leaders in exchange for the peace talks.
The LRA has abducted thousands of children and forced them to fight since the conflict began.