Civilians have been fleeing the fighting in the north-east
A ceasefire has been agreed to end violence in the north-eastern region of Ituri in the Democratic Republic of Congo.
The truce was signed in the town of Bunia by delegates from the Congolese and Ugandan governments, as well as rebel groups and ethnic militias.
After the agreement brokered by UN envoy Amos Namanga Ngongi, the different parties began talks on the creation of a new local authority for the region.
The deal should reduce tension between neighbouring Uganda and Rwanda.
Uganda sent reinforcements to dislodge a rebel group, the UPC, from the north-eastern Congolese town of Bunia. They did not sign the truce.
The withdrawal of Uganda forces from the area around Bunia is conditional on a truce.
Last week, Rwanda said it would return to DR Congo, unless Uganda also withdrew its troops.
Britain is a major donor to both Uganda and Rwanda and has been trying to reduce tensions between the former allies.
Their soldiers have clashed on several occasions on Congolese territory during the five-year DR Congo conflict.
The British Government has warned Rwanda not to send troops back into DR Congo saying they were "gravely concerned about the deteriorating situation in Ituri".
Rwanda and Uganda have accused each other of arming the other's rebel groups operating in DR Congo.
DR CONGO'S WAR
Seven foreign armies
At least 2 million dead
Disease and abuses widespread
Rwanda withdrew its forces from DR Congo last October following a peace deal with the Congolese Government.
The United Nations allowed Uganda to keep some 1,000 troops in Bunia in order to keep the peace between local militias and rebel groups.
Congolese Foreign Minister Leonard She Okitundu condemned Rwanda and Uganda for preferring to fight each other inside DR Congo, rather than across their common border.
He also told the BBC's Network Africa that Rwanda had never withdrawn all its troops from Congolese territory.
The fighting in Bunia at one point threatened the signing of a deal to end the five-year war in DR Congo.
But the Rwanda-backed RCD-Goma group agreed to take part in a power-sharing government and a new unified army.
The recent outbreak of fighting coincided with the announcement by the chairman of the Inter-Congolese Dialogue, Sir Ketumile Masire, to hold a big ceremony in South Africa next week to mark the end of peace negotiations.
More than two million people are believed to have died as a result of the war which began in 1998, and at one stage dragged in half a dozen foreign armies.