CAIRO — The African Union envoy to Sudan said Saturday the pro-democracy movement and the ruling military council have finalized a power-sharing agreement.

Mohammed el-Hassan Lebatt told reporters that the two sides "fully agreed" on a constitutional declaration outlining the division of power for a three-year transition to elections. He did not provide further details, but said both sides would meet later on Saturday to prepare for a signing ceremony.

The pro-democracy coalition issued a statement saying they would sign the document Sunday.

The military overthrew President Omar al-Bashir in April following months of mass protests against his three-decade-long authoritarian rule.

The protesters remained in the streets, demanding a rapid transition to a civilian government. They have been locked in tense negotiations with the military for weeks while holding mass protests.

The two sides reached a preliminary agreement last month following pressure from the United States and its Arab allies, amid growing concerns the political crisis could ignite civil war.

That document provided for the establishment of a joint civilian-military sovereign council that would rule Sudan for a little over three years while elections are organized. A military leader would head the 11-member council for the first 21 months, followed by a civilian leader for the next 18.

There would also be a Cabinet of technocrats chosen by the protesters, as well as a legislative council, the makeup of which would be decided within three months.

Ebtisam Senhouri, a negotiator for the protesters, told a press conference that the pro-democracy movement would choose 67% of the legislative body, with the remainder chosen by political parties that were not part of al-Bashir's government. The military would select the defense and interior ministers during the transition.

The two sides had been divided over whether military leaders would be immune from prosecution over recent violence against protesters. It was not immediately clear whether they had resolved that dispute.

The two sides came under renewed pressure this week after security forces opened fire on student protesters in the city of Obeid, leaving six people dead. At least nine troops from the paramilitary Rapid Support forces were arrested over the killings.

In June, security forces violently dispersed the protesters' main sit-in outside the military headquarters in Khartoum, killing dozens of people and plunging the fragile transition into crisis.

Protest leader Omar al-Dagir said the agreement announced Saturday would pave the way for appointments to the transitional bodies.

"The government will prioritize peace (with rebel groups) and an independent and fair investigation to reveal those who killed the martyrs and hold them accountable," he said.

Sudan has been convulsed by rebellions in its far-flung provinces for decades. Al-Bashir, who was jailed after being removed from power, is wanted by the International Criminal Court on charges of genocide stemming from the Darfur conflict in the early 2000s. The military has said he will not be extradited. Sudanese prosecutors have charged him with involvement in violence against protesters.