Sudan’s military rulers and the main opposition coalition have reached an agreement paving the way for a new transitional government, the African Union said, after a long period of negotiations following the toppling of long-time ruler Omar al-Bashir in April.

Mohamed Hassan Lebatt, the AU mediator for Sudan, told reporters on Saturday that the two sides “fully agreed on a constitutional declaration” outlining the division of power for a three-year transition to elections.

The document, which outlines the powers and the relationships between the branches of the transitional government, comes after weeks of protracted negotiations brokered by the AU and neighbouring Ethiopia amid sporadic bouts of violence in the capital, Khartoum, and other cities.

The main opposition coalition, the Forces of Freedom and Change (FFC), welcomed the agreement as a “first step with more to follow” and pledged to complete the journey to “freedom, peace and justice” in Sudan.

The FFC said both sides were expected to sign it on Sunday.

As news of the agreement emerged, people began gathering on Nile Street, the main avenue in Khartoum, honking car horns and ululating in celebration.

“We have been waiting for a civilian state to seek fair retribution from the murderers of our sons,” one protester Somaiya Sadeq told AFP news agency.

“We’re victorious!” some people chanted while others sang the national anthem.

Challenges ahead

The declaration states that the FFC will appoint a prime minister as soon as the document is signed. The prime minister will be tasked to form the government in consultation with the FFC. However, the defence and the interior ministers will be appointed by the military council.

“The cabinet will have no more than 20 ministers, the FFC will nominate the prime minister. He will then be appointed by the sovereign council, and the prime minister will then form a cabinet and that cabinet will need to be confirmed by the sovereign council,” said Ebtisam Sanhouri, a negotiator for the FFC.

The declaration also envisages the appointment of a 300-member legislative assembly to serve during the transitional period. Sanhouri said the opposition coalition would have 67 percent of its seats and other political groups not associated with al-Bashir would have the rest.

Once the transitional government – or sovereign council – starts work, Sudan embarks on a three-year transition period expected to lead to elections.

The negotiators agreed last month that the sovereign council would have 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. Its first leader will be from the military.

“This deal cannot fulfil all the people’s demands,” Madani Abbas Madani, a member of the FFC, told reporters. “Challenges are there and will continue to exist for the civilian government, we have a regime which ruled for 30 years, and the system is deeply entrenched.”

When the sovereign council is formed, the current ruling body, a transitional military council, will be dissolved. It is currently headed by General Abdel Fattah al-Burhan and his deputy, General Mohamed Hamdan Dagalo, commander of the paramilitary Rapid Support Forces (RSF). Protesters have accused RSF members of killing demonstrators, including on June 3 when security forces dispersed a protest camp in Khartoum, the protest movement’s focal point in its months-long struggle for democracy.

The role of the RSF had been a point of contention during the negotiations. According to a draft of the declaration seen by Reuters, the RSF will now fall under the general command of the armed forces.

“We are happy about the agreement and the deal because it is one of the steps that could make this transforming from dictatorship to a democratic country,” said Ashraf Mohamed Ali, a protester from the city of Omdurman.

“But the agreement does not mean anything for the people unless it is implemented on the ground .. it would be a challenging mission for this government,” he told Al Jazeera.