Under a landmark accord, the country's contested president, Joseph Kabila -- who under the constitution should have left office on December 20 -- will stay in power until elections are held at the "end of 2017".
During this 12-month period, a so-called National Transition Council will be set up, headed by opposition leader Etienne Tshisekedi, and a prime minister will be named from opposition ranks.
The deal was reached after talks launched by the Roman Catholic church amid escalating violence, claiming between 40 and 100 lives as Kabila's second and final mandate ended and he showed no signs of stepping down.
Several last-minute hitches nearly derailed an accord before the deal was announced late Saturday after a 13-hour marathon.
Archbishop Marcel Utembi, head of the National Episcopal Conference of Congo, described the accord as an "inclusive political compromise."
- Optimistic but cautious -
Foreign observers hailed the agreement, but also cautioned of the work that lay ahead.
EU foreign affairs supremo Federica Mogherini, in a statement with Neven Mimica, the European commissioner for international cooperation, said the agreement "should open the way towards a consensual and peaceful transition."
But, they warned, "during the transition period, the institutions of state will draw their legitimacy both from their inclusiveness and their ability to implement the agreement in all its respects."
The head of the UN Mission in the Congo (Monusco), Maman Sidikou, also welcomed the deal.
But, said Sidikou, "work must continue, it is necessary to safeguard political stability by implementing every point of this new political roadmap".
Resource-rich but chronically poor, sapped by corruption and politically unstable, Democratic Republic of Congo has never witnessed a democratic transfer of power following polls since independence from Belgium in 1960.
Two decades ago, the country collapsed into the deadliest conflict in modern African history.
Its two wars in the late 1990s and early 2000s dragged in at least six African armies and left more than three million dead. Its restive east remains a battleground for rival ethnic militias.
Kabila, 45, has been in power since the 2001 assassination of his father Laurent at the height of the Second Congo War.
He was confirmed as leader in 2006 during the first free elections since independence from Belgium in 1960, and re-elected for a second term in 2011 in a vote marred by fraud allegations.
- Compromises -
Sixteen representatives met on Saturday, comprising eight from the opposition coalition, called Rassemblement ("Gathering"), and eight from the government and groups which had signed a deal with the regime in October.
According to a working document for the deal previously seen by AFP, Kabila gave an undertaking that he would not seek a third mandate.
In return, the opposition accepted the president would remain in office until handing over to an elected successor. It had previously demanded his immediate departure from public life.
In another gain for the opposition which had feared Kabila would seize the interim period to shore up his position, the signatories agreed "no attempt to revise the constitution will be undertaken" during the transition.
In a nationwide TV address after the deal, Kabila said "the electoral process must be pursued tirelessly."
The bishops also promised to seek a solution for political prisoners, especially Moise Katumbi, a wealthy businessman and potential presidential candidate the opposition want to be allowed to return to the country.
Katumbi has been sentenced to a three-year term in prison in an alleged case of property fraud and faces another trial in an alleged case of mercenary recruitment.
Voters were originally to have chosen a new president in 2016.
But the authorities said the electoral register had to be overhauled -- a huge enterprise in a country almost the size of Europe.
And in a highly controversial ruling, the constitutional court had said Kabila could remain in office until an election was held.
The ruling fed opposition fears that he planned to amend the constitution to allow him to run for a third term. AGENCIES