Sudan's ruling military council and main opposition coalition have agreed on a constitutional declaration which will pave the way for a new period of transitional government.
African Union mediator Mohamed Hassan Lebatt made the announcement early on Saturday, without giving any details.
Sudan has been in turmoil since the military ousted President Omar al-Bashir in April.
Protracted talks over the declaration have been held amid much violence.
The long-awaited declaration deal triggered celebrations in Sudan, which has been plunged into months of crisis.
Both sides signed a power-sharing accord in July, but demonstrators have been waiting since then for more details about the agreement.
Protests first broke out in December after Mr Bashir's government imposed emergency austerity measures. He was then overthrown by the military in April after prolonged protests outside the defence ministry in Khartoum.
Demonstrators have since called for authority to be transferred to a civilian administration.
The document outlines the terms of a three-year transitional period agreed last month by the military council and opposition leaders.
The power-sharing deal envisages a governing body of six civilians and five generals.
"I am announcing to the Sudanese, African and international public opinion that the two delegations have fully agreed on the constitutional declaration," Mr Lebatt told reporters on Saturday.
He said further meetings would be held to work out the technical details of the signing ceremony, but did not provide any information about the agreement itself.
A draft of the declaration seen by Reuters news agency said the paramilitary Rapid Support Forces (RSF), which have been accused of killing protesters, will now fall under the general command of the armed forces, and the intelligence service will be co-supervised by the sovereign council and the cabinet.
The deal on the declaration came after the military council announced that nine RSF soldiers had been dismissed and detained in connection with the killing of protesters, including four schoolchildren, this week.
The deaths had prompted mass demonstrations across the country and caused delays in the talks.
The military and protesters have reached several agreements, with each side fleshing out new details as they try to overcome suspicion and build a working relationship.
They have so far agreed on the following:
- Power-sharing will last for 39 months.
A sovereign council, cabinet and legislative body will be formed.
A general will head the council for the first 21 months, a civilian for the remaining 18.
A prime minister, nominated by the pro-democracy movement, will head the cabinet.
The ministers of defence and interior will be chosen by the military.
The long transition period is seen as a victory for the pro-democracy movement - the generals had threatened a snap election after the 3 June crackdown.
Demonstrators argue that Mr Bashir's regime is so deeply entrenched that it will take time to dismantle its political network and open the way for free and fair elections.