Sudan's pro-democracy movement and the ruling military council signed a document early Wednesday that outlines a power-sharing deal, but the two sides are still at work on a more contentious constitutional agreement that would specify the division of powers.

The signing ceremony held in the capital, Khartoum, after marathon overnight talks, marks an important step in the transition to civilian rule following the military overthrow of long-ruling autocrat Omar al-Bashir amid mass protests in April.

But the military appears to have the upper hand, following weeks of negotiations and a deadly crackdown last month in which security forces violently dispersed the protesters' main sit-in.

The document signed Wednesday would establish a joint civilian-military sovereign council that would rule Sudan for a little over three years while elections are organized. A military leader will head the 11-member council for the first 21 months, followed by a civilian leader for the next 18.

It marks a significant concession by the protesters, who had demanded an immediate transition to civilian rule. The pro-democracy movement would appoint a Cabinet, and the two sides would agree on a legislative body within three months of the start of the transition.

But the two sides have yet to agree on a division of powers between the sovereign council, the Cabinet, and the legislative body, which would be enshrined in the constitutional document. That document, which they hope to adopt in talks scheduled for Friday, would also set the terms of military leaders' potential immunity from prosecution.

"This is the big hurdle. Sudan's future after al-Bashir will be defined by this constitutional declaration," said Rasha Awad, editor of the online Sudanese newspaper Altaghyeer.

The military has said the sovereign council should be able to veto appointments to the Cabinet and Cabinet decisions, something the protesters fear would deprive it of any real power.

The protesters have also said that members of the council should be stripped of immunity if they are implicated in last month's crackdown. Some factions, like the Communist Party, have rejected the deal because it does not prescribe an international investigation of the violence.

Protest organizers say security forces killed at least 128 people during last month's crackdown. Authorities put the death toll at 61, including three members of the security forces. The two sides have agreed on a Sudanese investigation into the violence, but have yet to outline its scope.

The agreement signed Wednesday at a ceremony broadcast by state TV stems from a meeting last month brokered by the United States and Britain, which support the protesters, and Egypt, Saudi Arabia, and the United Arab Emirates, which back the military. The diplomatic push ended weeks of stalemate that had raised fears of further violence or even civil war.

"We are ushering in a new era," said Ibrahim al-Amin, a negotiator for the Forces of the Declaration of Freedom and Change, a broad-based coalition including independent professional unions, traditional political parties, and other groups.

"The upcoming government will be a government of all Sudanese, for all citizens ... we have suffered enough from the totalitarian dictatorial regime."

The military was represented by General Mohammed Hamdan Dagalo, known as Hemedti, who has consolidated power since Mr. Bashir's overthrow and whose paramilitary Rapid Support Forces are accused of leading last month's crackdown. He hailed the agreement as a "historic moment in Sudan."

Envoys from Ethiopia and the African Union, who had spearheaded mediation efforts, also praised the agreement at Wednesday's ceremony. The U.S. Embassy in Khartoum welcomed the deal and encouraged both sides to "continue the same spirit of cooperation to conclude a constitutional decree."

Mr. Bashir, who ruled Sudan for 30 years, has been jailed in Khartoum since his ouster. In May, Mr. Bashir was charged with involvement in killing protesters and incitement to kill protesters during the popular uprising that started in December, initially over price increases.

Get the Monitor Stories you care about delivered to your inbox. By signing up, you agree to our Privacy Policy

He is also wanted by the International Criminal Court on charges of war crimes and genocide linked to the Darfur conflict in the 2000s, but Sudan's military has said it will not extradite him to the Hague. He was the only sitting head of state subject to an international arrest warrant.

This story was reported by The Associated Press.