Civilians have been fleeing the fighting in the north-east
Democratic Republic of Congo government and rebel representatives have endorsed the creation of a power-sharing administration after almost five years of civil war.
More than 350 delegates meeting in the South African resort of Sun City also agreed to a new constitution.
The deal is due to be signed on Wednesday and if implemented, will lead to elections in two years time' - the first democratic elections since independence from Belgium more than 40 years ago.
But one delegate told the BBC's Great Lakes service that discussions are continuing over the distribution of military posts in the new army.
And fighting in the east of the vast country still continues, raising doubts about whether the deal will hold.
The deals, grouped under a document called The Final Act, are supposed to be formally signed on Wednesday, but is unclear whether Congolese President Joseph Kabila and MLC rebel leader Jean-Pierre Bemba will attend.
In a message delivered on his behalf, the United Nations Secretary-General, Kofi Annan, said the meeting marked a breakthrough which was potentially of great importance for the whole of Africa.
Withdrawal put back
Under the deal, President Joseph Kabila keeps his post, while rebels and the civilian opposition get vice-presidential posts in a two-year transitional authority.
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.
DR CONGO'S WAR
Seven foreign armies
At least 2 million dead
Disease and abuses widespread
Earlier negotiations were almost ended by fighting around the north-eastern town of Bunia, which remains tense.
Uganda has postponed its withdrawal from DR Congo because of the fighting in Bunia.
But Rwanda threatened to send its troops back into DR Congo unless the Ugandans pull out.
On Monday, a spokesman for the Rwandan-backed Congolese Rally for Democracy (RCD-Goma) denied reports that thousands of Rwandan troops had crossed back in to DR Congo.
Rwanda and Uganda have accused each other of arming the other's rebel groups operating in DR Congo and the armies of the former allies have clashed several times on Congolese territory.