Sudan's ruling generals and protest leaders have reached a "full agreement" on the constitutional declaration, the African Union has said, paving the way for transitioning to civilian rule.
The document is complementary to a power-sharing deal signed on 17 July that aims to form a joint civilian-military ruling body, which will oversee the formation of a transitional civilian government and parliament to govern for a three-year transition period.
It comes after prolonged negotiations between Sudan's ruling military council and leaders of the protest movement that toppled veteran leader Omar al-Bashir in April.
"I am announcing to the Sudanese, African and international public opinion that the two delegations have fully agreed on the constitutional declaration," AU mediator Mohamed El Hacen Lebatt told reporters.
He said meetings will be held to work out the technical details of the deal and discuss the formal signing ceremony.
After the announcement, reporters erupted in cheers and the generals immediately exited the hall where the negotiations were held in Khartoum.
Protest leaders remained to answer journalists' questions.
"We agreed on sensitive issues related to security and independence of the judiciary and the powers of the cabinet as well as the ruling sovereign council," said protest leader Ibrahim al-Amin.
Under the agreement, "the feared paramilitary Rapid Support Force will report to the head of the armed forces", said protest leader Monzer Abu al Maali.
The protest movement has long blamed the irregulars of the powerful RSF, whose commander General Mohamed Hamdan Daglo is deputy head of the ruling military council, for the deadly violence against demonstrators.
Crowds of Sudanese people outside the hall broke out in celebration after the announcement.
The jubilant crowds waved the Sudanese flag chanting "civilian, civilian" as drivers honked their car horns.
"We have been waiting for a civilian state to seek fair retribution from the murderers of our sons," said one protester Somaiya Sadeq.
On 3 June, armed men in military fatigues carried out a brutal raid on a protest camp in Khartoum that was widely blamed on the RSF.
At least 127 people were killed, according to doctors linked to the protesters. Officials have given a much lower death toll.
On Thursday, four protesters were shot dead at a rally in the Sudanese city of Omdurman, according to medics linked to the protest movement.
The gunfire occurred as thousands of demonstrators took to the streets in several cities across Sudan, including the capital Khartoum and its twin city Omdurman, to demonstrate against the killing of schoolchildren at a Monday protest in Al-Obeid in North Kordofan.