President Joseph Kabila will stay on for another year but won’t stand for a third term under the proposed deal.

Congolese politicians have agreed in principle to a deal under which President Joseph Kabila leaves office by the end of next year, opposition leaders said, an unexpected breakthrough after more than 40 people died in anti-government protests this week.

However, a mediator said on Friday that an agreement was still not signed and it was unclear if it would be over the coming days.

Kabila’s mandate as president of Democratic Republic of Congo expired on Tuesday, but he has remained in office as presidential elections scheduled for last month were postponed until at least April 2018.

In return for Kabila staying on for another year, the constitution will not be changed to let him stand for a third term, and a prime minister will be named from the main opposition bloc.

Opposition leader Etienne Tshisekedi will oversee implementation of the deal, politicians Martin Fayulu and Jose Endundo told Reuters news agency.

“Kabila stays for one year,” Fayulu said. “He will not try to stand for a new term.”

A government spokesman declined to comment on the agreement.

If the deal does succeed, it would be a major achievement for the Catholic church, which has been mediating talks in an attempt to prevent Democratic Republic of Congo sliding back into years of anarchy and civil war.

Millions were killed in wars between 1996 and 2003.

Church leaders have presented the talks as a last ditch effort to prevent violence spinning out of control after a bloody week that saw protesters killed and deadly clashes between various ethnic militia across the country.

At least 40 people were killed and another 460 arrested this week during protests against Kabila’s refusal to leave office, the UN said on Friday.

“Some 107 people have been injured or ill-treated and there have been at least 460 arrests,” the UN human rights office said in Geneva.

More than two dozen people killed in DRC protests

Kabila has declined to commit publicly to not changing the constitution to extend his term, leading many to conclude this is what he secretly wants to do.

Questions still surround the proposed agreement.

On Friday morning a source in the Congo National Episcopal Conference, which is presiding over the negotiations, told AFP news agency tersely: “There have been complications.”

A mediator subsequently said “the signature could now be between Christmas and the New Year”.

DR Congo has never witnessed a democratic transfer of power following polls since independence from Belgium in 1960.