GIVEN HOW discouraging the situation in Sudan looked a few weeks ago, after a terrible massacre and uncertain end to three decades of despotism under President Omar Hassan al-Bashir, it is reassuring to see that democracy-seeking protesters and the military council have agreed on a power-sharing plan leading to eventual civilian control. Now, it appears at least possible that Sudan will have a chance at popular rule.

The power-sharing agreement provides for the creation of a sovereign council with 11 members, five of them civilians, five picked by the military and the 11th to be jointly designated. The council will rule for 21 months under a military leader, then 18 months under a civilian, before giving way to elections and a new government. If Sudan becomes a democracy little more than three years from now, it will be quite a remarkable achievement, particularly in these days when democracy seems to be in retreat elsewhere. Quite unexpectedly, the deal came together with help from Saudi Arabia, Egypt and the United Arab Emirates, which had seemed previously to be backing the military council, as well as pressure from the United States and Britain.

Looking ahead, it is vital all parties adhere to the agreement and not walk away. The military must not be tempted to break the deal during its 21 months and seize absolute power. This won’t be easy for security organizations that were pampered by Mr. Bashir.

Another question mark is the pledge in the agreement for an investigation into the June 3 crackdown. Demonstrators have put the death toll at 128, while the authorities have said 61, including some security personnel. Will the investigation be able to hold to account the Rapid Support Forces, a paramilitary organization that, witnesses said, rampaged on the streets and opened fire on protesters in an encampment outside army headquarters? The paramilitary leader, Gen. Mohamed Hamdan Dagalo, known by the nickname “Hemedti,” is second-ranking on the military council, and is known for his ruthless tactics.

In televised remarks over the weekend, the leader of the council, Gen. Abdel-Fattah Burhan, insisted that its members did not order the violence. “We trust that military council members had nothing to do with what happened in the sit-in dispersal,” he said. What’s needed is a penetrating and independent inquiry in which no one is excluded in such a preemptory fashion.

The Sudanese authorities also cut off mobile devices from the Internet last month, throwing Sudan into digital darkness and denying the opposition a vital means for galvanizing the population. If the power-sharing deal is to work, connectivity must be restored immediately.

Further stress will come as Sudan battles economic woes that provided the first spark for the unrest against Mr. Bashir. If the power-sharing deal holds, Sudan must be given a chance to rebuild with substantial economic aid and expertise from abroad.

Read more: