By Peter Greste
BBC East Africa correspondent
Radical Somali Islamist forces continue to fight against the government
Somalia's interim government and one of the main opposition groups have agreed to observe a ceasefire agreed in June during UN-brokered talks in Djibouti.
The ceasefire will come into effect next month and Ethiopian troops backing the government will start to withdraw.
The government and the Alliance for the Re-liberation of Somalia (ARS) say they will form a unity government.
Other groups - including Islamist militias - continue to fight against the transitional government.
They will not observe a ceasefire until Ethiopians leave the country.
The Djibouti agreement is, potentially, extremely significant.
Somalia's transitional federal government and the Islamist ARS have signed what the UN calls a "ceasefire-observance agreement" - a carefully worded reference to an earlier ceasefire that never came into effect.
The new accord sees Ethiopian troops leaving strategic areas of Somalia, and has them replaced first by African Union troops from Uganda and Burundi, and then later by a joint "police force".
But significantly, they have also agreed to form a "unity government" including politicians from both sides.
The emphasis, however, is on the agreement's potential.
The sticking point in the past has been over the presence of the Ethiopians, so their departure would open new room for a more comprehensive peace plan.
But there are three other armed groups opposing the current administration, and this deal does nothing to include them.
Until they are brought into the process, diplomats say it is hard to see an end to Somalia's troubles.
A separate process about to get under way in Nairobi brings together six East African countries under the regional group known as the Intergovernmental Authority on Development (Igad).
They are due to hold a summit in Nairobi later in the week, ahead of an extraordinary meeting of the Somali parliament.
The two processes have not been co-ordinated, but they could still complement one another.