Negotiators from the Democratic Republic of the Congo's (DRC) Catholic Church say President Joseph Kabila has agreed to resign, after new elections are held before the end of 2017.
Marcel Utembi, president of DRC's Catholic Bishops' Conference, says the weeks-long discussions haven't been easy, but he's pleased with the resolution: "I'm happy to inform you tonight that we have managed to reach the end of the tunnel. The different delegates have come to agreement."
There had been speculation the talks were close to collapse, with negotiations over-running a planned signing ceremony in the capital Kinshasa.
The main sticking point had been the appointment of a new prime minister.
Opposition politician Freddy Matungulu says the consensus is that the position should go to a member of the main opposition party.
"We also thought as a group that it was important that the service of the prime minister should return to the opposition. The Bishop said the two parties, the participants, the African Union and the opposition all agree that the Prime Minister should come from the opposition."
President Kabila had claimed that logistical issues, such as difficulty registering voters, had delayed the holding of elections to choose the country's next leader.
Having already been in power for two terms, Mr Kabila could not run for a third under the constitution.
Under the deal, he will not change the constitution to allow him to participate in the upcoming elections.
Protests had broken out across the country over Mr Kabila's refusal to step down, with security forces killing at least 40 people last week alone.
Speaking during the height of the rallies, Elizabeth Throssel, a spokeswoman for the United Nations Office of the High Commissioner for Human Rights, slammed the government's actions.
"Such high casualties figures suggest a serious disregard by the various police, defence and security forces of the need to exercise restraint in policing demonstrations. Not only are soldiers participating in law enforcement operations but all the forces involved are heavily armed and using live ammunition."
If successful, this will be the nation's first peaceful transfer of power since it gained independence in 1960.

