Sudan’s military leaders on Thursday reached an agreement with the opposition alliance to share power until elections can be held in the country. 

Mediators say the two sides agreed to rotate control of the Sovereign Council, the top tier of power in the North African country for at least three years.

The latest round of talks took place in the country’s capital, Khartoum earlier this week and were heavily mediated by the Ethiopian Prime Minister, Abiy Ahmed and members of the African Union (AU).

The AU said both parties have also pledged to form an independent technocratic government and to investigate the violence which has engulfed the country in recent times. 

“The two sides agreed on establishing a sovereign council with a rotating military and civilian (presidency) for a period of three years or a little more,” AU mediator, Mohamed Hassan Lebatt told reporters on Friday morning. 

The agreement will see the military in charge of the administration of the country for the first 18 months, followed by a civilian-run administration for the remaining 18 months.

News of the agreement reportedly sparked street celebrations in the country which has been in turmoil since the military ousted President Omar al-Bashir in April.

Both sides also reportedly agreed to have a detailed, transparent, national, independent investigation into all the regrettable violent incidents which the country faced in recent weeks.

The Deputy Head of the Transitional Military Council (TMC), General Mohamed Hamdan Dagalo also assured that the agreement will be comprehensive and will not exclude anyone.

Days before the three-year transitional deal was announced, large crowds took to the streets to demand that the ruling military council hand power to a civilian-led administration. Seven people were killed and 181 were hurt in clashes which followed.