President Joseph Kabila of Democratic Republic of Congo is set to leave power in 2017 and elections to be held the same year under a political deal close to completion, opposition leaders say.

Kabila took power after his father, Laurent, was assassinated in 2001, and critics saw the violence as an attempt to crush dissent and enable the extension of his constitutional mandate, which ended on Tuesday after two terms in power.

As a result, any deal resulting from the weeks of talks between the ruling coalition and the opposition mediated by the Catholic church would come as a shock.

“It is difficult for me to tell you whether (the deal) will be in two hours or three hours. We are in the process of working. We can only leave here when everything is finished,” opposition leader Joseph Olenghankoy told reporters.

Kabila says he supports the talks but has yet to comment on their substance.

A deal would also be an achievement for the Catholic church, which says the talks are an attempt to stop Congo sliding back into anarchy and war. Pope Francis has heaped pressure on all sides to find a peaceful solution.

“At first glance, a miracle is possible and the bishops have won their bet,” said Albert Moleka, former chief of staff to the leader of the main opposition bloc, Etienne Tshisekedi.

A government spokesman said the proposal was to have been presented to the full delegation on Friday afternoon.

Under the deal’s terms, Kabila would stay in power for a year, but the constitution cannot be changed to let him run again. A prime minister would be named from the main opposition bloc and Tshisekedi would oversee the deal’s implementation, opposition leaders Martin Fayulu and Jose Endundo told Reuters.

“Most of … (Kabila’s coalition) would welcome this (deal) because they’re under so much pressure,” said Pascal Kambale, a Congolese human rights lawyer at the Open Society Foundations.

A presidential election set for last month has been postponed until at least April 2018 because of delays registering voters. This deal would mean the election must happen by the end of next year.

Kabila’s allies say he will respect the constitution, but that promising to step down would make him a lame duck and spark a power struggle that could put his life in danger.