Sudan's ruling military council and an opposition alliance have signed a political accord as part of a power-sharing deal aimed at leading the country to democracy following three decades of autocratic rule.
The agreement, which ended days of speculation about whether a deal announced this month would hold, was initialled in Khartoum in the presence of African mediators following a night of talks.
Sudan's stability is crucial for the security of a volatile region stretching from the Horn of Africa to Libya riven by conflict and power struggles.
The deal is meant to pave the way to a political transition after military leaders ousted former President Omar al-Bashir in April following weeks of protests.
At least 128 people were killed during a crackdown that began when security forces dispersed a protest camp outside the Defence Ministry in Khartoum in June, according to medics linked to the opposition.
A political standoff between Sudan's military rulers and protesters threatened to drag the country of 40 million towards further violence.
General Mohamed Hamdan Dagalo, the deputy head of Sudan's Transitional Military Council, hailed the agreement as the start of a new partnership between the armed forces, including the paramilitary forces he leads, and the opposition coalition of Forces of Freedom and Change (FFC).
Ibrahim al-Amin, an FFC leader, said the accord signalled a new era of self-reliance for Sudan's people.
"We want a stable homeland, because we have suffered a great deal," Amin said in a speech after the ceremony on Wednesday.
Ethiopian mediator Mahmud Dirir said Sudan, long under international isolation over the policies of the Bashir administration, needed to overcome poverty and called for the country to be taken off a US list of states supporting terrorism.
The two sides are still working on a constitutional declaration, which is expected to be signed on Friday.
Under the power-sharing deal, the two sides agreed to share power in a sovereign council during a transitional period of just over three years.
They also agreed to form an independent government of technocrats to run the country and launch a transparent, independent investigation into the violence.
The agreement called for a sovereign council comprised of 11 members - five officers selected by the military council, five civilians chosen by the FFC and another civilian to be agreed upon by both sides.
But the agreement was thrown into doubt when new disputes surfaced last week over the military council's demand for immunity for council members.
The military council also demanded the sovereign council would retain ultimate decision-making powers rather than the government.
Australian Associated Press