Sudan’s ruling generals and a coalition of protest and opposition groups have reached an agreement to share power during a transition period until elections, in a deal that could break weeks of political deadlock since the overthrowing of autocratic President Omar al-Bashir in April.

Both sides agreed to establish a joint military-civilian sovereign council that will rule the country by rotation “for a period of three years or slightly more”, Mohamed Hassan Lebatt, African Union (AU) mediator, said at a news conference on Friday.

Under the agreement, five seats would go to the military and five to civilians, with an additional seat given to a civilian with military background.

The ruling Transitional Military Council (TMC) and the civilian leaders also agreed to launch a “transparent and independent investigation” into the violence that began on June 3 when scores of pro-democracy demonstrators were killed in a brutal military crackdown on a protest camp in the capital, Khartoum.

Omar al-Degair, a leader of the Forces for Freedom and Change (FFC), an umbrella organisation of opposition groups, said the agreement “opens the way for the formation of the institutions of the transitional authority, and we hope that this is the beginning of a new era”.

TMC deputy head General Mohamed Hamdan Dagalo, who is widely known as Hemeti, welcomed the deal, which, he said, would be inclusive.

“We would like to reassure all political forces, armed movements and all those who participated in the change from young men and women that this agreement will be comprehensive and will not exclude anyone,” added Dagalo,

In a statement on Friday morning, the Sudanese Professionals Association (SPA), which is part of the FFC, said the transition period would last three years and three months.

The military would lead the sovereign council for the first 21 months, and a civilian leader would take over for the remaining 18 months, it said.

The FFC would appoint a cabinet of ministers, the SPA said, adding that a legislative council will be formed after the appointment of the sovereign council and the cabinet.

The two sides also agreed to set up a committee of lawyers, including jurists from the AU, to finalise the agreement within 48 hours.

The deal came after two days of talks following the collapse of the previous round of negotiations following the crackdown on the protest camp.

Opposition medics say more than 100 people were killed in the dispersal and subsequent violence on June 3. Officials put the death toll at 62.