A power-sharing agreement has been signed in Sudan between the ruling military council and the main opposition coalition.
Sudan has been hit by months of protests which have seen dozens of demonstrators killed.
The signing, at a ceremony in the capital Khartoum, sets up a joint military and civilian council to rule for a little over three years until elections can be held.
It was agreed that a military leader would head the 11-member council for the first 21 months, followed by a civilian leader for the next 18.
A cabinet appointed by the activists would also be established, and a legislative body is set to be assembled within three months.
The coalition that was behind the protests would have a majority in that body.
A statement on the Twitter account of the Sudanese Professionals Association, one of the groups that had been leading the protests, called for celebrations.
It said: “It was incumbent upon us all to unite in order to build a homeland as long as we dreamed of it.
“God has given us a country with countless good things, but we need hands that extend to benefit from them and direct them for the benefit of all.”
There were reports people were streaming into the capital in order to mark the event.
There were growing concerns the political crisis could ignite civil war and Ethiopia and the African Union jointly-led efforts to bring about a deal.
Ethiopian Prime Minister Abiy Ahmed was among those who attended Saturday’s ceremony.
In April, the military overthrew the former dictator Omar al Bashir amid ongoing protests against his three-decade hold on power.
The protesters then stayed on the streets, calling for civil rule.
The agreement has been criticised by the Sudan Revolutionary Front, an alliance of the largest rebel groups in Darfur, where a conflict has left hundreds of thousands dead, according to the UN.