Sudan's government and rebel forces have agreed a landmark deal aimed at ending decades of war in which hundreds of thousands of people have been killed.
After an initialling ceremony on August 31, rebel commanders and the transitional government, which took power after the toppling of hardline ruler Omar al-Bashir last year, are set to sign a "final" deal on October 2.
Who are the rebels?
The Sudan Revolutionary Front (SRF) is a coalition of five rebel groups and four political movements.
They come from the vast western region of Darfur, at war since 2003, as well as South Kordofan and Blue Nile states in the country's south.
Rebels there took up arms in 2011 following a pause in the wake of Sudan's 1983-2005 civil war.
What does the deal promise?
The agreement deals with peace, justice, rights and the "fair distribution of authority (and) wealth."
Sudan's rebels are largely drawn from minority groups that chafed from marginalisation under Bashir's regime.
The deal promises to end discrimination, including by making minority languages official.
It also protects freedom of religion, so that Christians and followers of local religions can worship in peace in the mainly Muslim nation.
What happens first?
Fighting stops. Both sides have agreed to a permanent cease-fire.
Rebel fighters will be slowly incorporated into joint units with government security forces.
Stay informed. Subscribe to our newsletter
Timelines have been set for the training and establishment of integrated forces.
How is power shared?
Rebels will get three seats in the sovereign council, the transitional government's top body.
They will also get a quarter of cabinet posts and a quarter of seats in the 300-member transitional parliament.
Women must make up at least 40 percent of government posts at all levels.
Rebels will also have a role in state governments.
Local authorities will operate with autonomy from Khartoum, raising their own taxes and managing the natural resources of their regions.
Who faces trial?
Old government leaders, not rebels.
The deal provides for an amnesty for political leaders and rebel commanders.
But ex-officials of the former regime must stand trial -- including Bashir.
The former strongman, already jailed for corruption, is on trial along with several former ministers for seizing power in a 1989 coup.
The deal calls for the formation of a special court for crimes in Darfur, where fighting killed 300,000 people.
Bashir is also wanted by the International Criminal Court (ICC) over charges of genocide and crimes against humanity in the western region.
The government agreed in February that Bashir should face the ICC, but domestic hearings may come first.
What will holdout rebels do?
If rebels fight on, the deal could be derailed.
One wing of the Darfur-based Sudan Liberation Movement (SLM) has refused to lay down arms.
Its leader Abdelwahid Nour has lived abroad for several years, including in Paris, but he is understood to have retained support on the ground.
Another key rebel force, led by Abdelaziz al-Hilu, also rejected the August deal, but days later Hilu signed a separate agreement with the government.
A veteran guerilla fighter who leads a faction of the Sudan People's Liberation Movement-North (SPLM-N), he had long fought for a secular state to replace the Islamist regime of Bashir.
Hilu's stronghold in the Nuba Mountains of South Kordofan has a significant Christian community among its mainly non-Arab population.
Under the separate deal, his forces will retain their guns for "self-protection", until Sudan's constitution is changed to separate religion and government.
It is unclear whether Hilu will take part in the signing ceremony on October 2.
How will it help refugees?
Millions of Sudanese were forced from their homes by the war, either becoming refugees in neighbouring nations or living in squalid camps within Sudan.
The deal provides for their voluntary return home, with full rights like any other Sudanese citizen.
Aid groups will also get access to the areas where they are returning.
During the conflict, humanitarian agencies were often blocked from large areas with acute needs.
Will it work?
Analysts are hopeful, but many have seen similar deals crumble before.
Turning rebels into regular troops brings together old foes in often uneasy joint forces.
Building peace and trust after so long at war takes time.
As people return home after years away, there are fears of fresh conflict if the current occupants refuse to return the property.
Clashes have erupted in Darfur in recent weeks.
Still, the deal is "a hugely significant sign of progress," said Jonas Horner, from the International Crisis Group think tank.
"But it is also far from comprehensive and only represents a first step towards peace," Horner added.
"Significant hurdles remain in the way of its implementation."