Sudan has been rocked by more than seven months of demonstrations and violence, with protesters demanding a civilian government after the ouster of long-time president Omar al-Bashir.
Here is an overview after the ruling generals and protest leaders on Saturday agreed on a constitutional declaration, hailed as a "victory" by demonstrators and paving the way for a promised transition to civilian rule.
Demonstrations break out in various cities on December 19, 2018 over a tripling of bread prices.
They spread nationwide with protesters demanding that Bashir quit after three decades in power.
On April 6, thousands set up camp outside the military headquarters in Khartoum.
Spurred by the uprising, the army ousts Bashir on April 11, putting military generals in charge.
After initial celebrations on the streets, the umbrella protest movement demands power be handed over to a civilian government.
On April 27, ruling generals and protest leaders agree to establish a joint civilian-military council to govern during a transition.
But both sides want their representatives to be in the majority; they also disagree over whether the council should be headed by a soldier or a civilian.
Demonstrators rally in the capital on May 2, saying the army is not serious about ceding power.
With the negotiations faltering, thousands of public and private sector workers strike on May 28 and 29 to pressure the military leaders.
On June 3, armed men in military fatigues move in on the protest camp at army headquarters to disperse the thousands participating in the two-month sit-in there.
It is the start of a crackdown that goes on for several days.
Doctors linked to the protest movement say the raid left 127 people dead and scores wounded, while the government count is considerably lower.
The feared Rapid Support Forces (RSF) paramilitary group is accused of being involved.
On June 9 and 10, a nationwide campaign of civil disobedience paralyses the country. There are more deadly clashes.
Power deal agreed
On June 30, tens of thousands again rally against the ruling generals.
Security forces are deployed en masse and police fire tear gas. Several people are killed.
Negotiations between the military rulers and protest leaders resume on July 3.
Early on July 5, they agree in principle on a new ruling council made up of six civilians and five representatives of the military.
A general would take charge for the first 21 months of the transition and then a civilian for 18 months. Elections would follow.
Crowds take to the streets of Khartoum to celebrate.
The power-sharing accord is signed by the two parties on July 17, with further talks planned to flesh out details.
Students shot dead
On July 23, hundreds of university students chanting "civilian rule" rally in Khartoum to demand justice for hundreds killed since demonstrations first erupted in December.
On July 28, there are protests in the capital calling for an independent probe into the deadly June raid.
People take to the streets on July 29 in the town of Al-Obeid, the capital of North Kordofan state, over shortages of bread and fuel.
A sniper opens fire on the crowd, killing five teenaged school students. A sixth person dies later.
The deaths spark outrage nationwide, prompting demonstrations in Khartoum and other cities.
Protest leaders call off talks planned for July 30 with the ruling generals.
Bashir's defence lawyer says on July 31 that the toppled leader will face trial on corruption charges on August 17.
Talks between protest leaders and ruling generals resume on August 1.
Two days later, the African Union announces the two sides have reached a "full agreement" on the constitutional declaration, paving the way for transitioning to civilian rule.
Thousands of jubilant Sudanese take to the streets of Khartoum to celebrate, expressing relief over the prospect of an end to months of demonstrations and political unrest.
Doctors linked to the protest movement say more than 250 people have been killed in protest-related violence since December.