Sudan's military and the pro-democracy coalition have reached an agreement to usher in a new period of transitional government.
The agreement came after weeks of negotiations and violence.
Mohamed El Hacen, a mediator from the African Union (AU), announced the agreement early on Saturday morning saying the two delegations have "completely agreed on a constitutional declaration".
Ethiopia and the African Union brokered talks between the Transitional Military Council and the Forces fo Freedom of Change to help reach the agreement.
Mohamed Hassan Lebatt, the AU mediator for Sudan, said meetings will be held to arrange a formal signing ceremony and representatives from both sides will continue talks over the technical details of the document. Legal and technical teams still need to establish a timeline for the declaration to take effect.
The declaration states that a prime minister will be appointed as soon as the document is signed. The prime minister will form a government in consultation with Sudan's opposition coalition, the Forces of Freedom and Change.
It also requires the appointment of a 300-member legislative assembly that will serve during the transitional period.
Once the transitional government starts work it will be in power for a period of three years. Elections are expected to take place at the end of that period.
The announcement came after weeks of protracted negotiations and bouts of violence in the capital of Khartoum.
After news of the agreement spread, people gathered on Nile Street to celebrate. Some people chanted "we're victorious" with others singing the national anthem.
Sudan has been in political turmoil since the military ousted President Omar al-Bashir in April. Protests began last December when President Bashir imposed austerity measures to prevent an economic crisis.
After cuts to bread and fuel subsidies angered demonstrators, they made demands for the military to force the president out of power which eventually happened in April.
Since then the Transitional Military Council has been met with frequent protests as well as opposing paramilitary forces and Islamist militias.