Sudanese Prime Minister Abdalla Hamdok‘s resignation has plunged the country’s already fragile democratic transition into further turmoil.

Hamdok told the country in a national address Sunday that he was stepping down after he failed to build a political consensus following an October military coup that rattled the transition. He called for talks to agree on a roadmap to complete the transition.

The Oct. 25 takeover came more than two years after a popular uprising forced the removal of longtime autocrat Omar al-Bashir and his Islamist government after nearly three decades in power.

Also Read: Sudan witnesses more anti-coup protests, tightens security

Here’s a look at what happened and what comes next:

WHAT HAPPENED?

On Oct. 25, the military dissolved Hamdok’s transitional government and the Sovereign Council, a power-sharing body of military officers and civilians that had been ruling Sudan since late 2019.

The military arrested Hamdok and several other senior officials and political leaders.

Gen. Abdel-Fattah Burhan, the coup’s architect and head of the Sovereign Council, announced that the military would hold power until elections can be held in July 2023.

He said a government of technocrats would be formed to administer the country until elections are held.

Burhan came under mounting international pressure, with Western, Arab and African nations calling for a return to civilian rule. The U.S. suspended $700 million in aid as it strongly condemned the coup.

Also Read: Despite deal, Sudanese rally to demand military rulers leave

The military allowed Hamdok to return to his residence the following day, and and the two sides eventually reached an agreement in November that reinstated the prime minister but sidelined the pro-democracy movement.

Government officials and political leaders detained in the coup were also released as part of the November deal.

The generals have portrayed the reinstatement of Hamdok as a step toward stabilizing the country ahead of elections and the international community has cautiously welcomed the agreement and called for pre-coup arrangements.

Hamdok has defended his deal with the military, saying that he stuck it mainly to prevent bloodshed and help return to a path of democratic transition.

WHERE DOES THE PRO-DEMOCRACY MOVEMENT STAND?

At the time of the coup, the Forces for the Declaration of Freedom and Change, the movement’s umbrella organization, was divided. Many organizations, including rebel groups that reached a peace deal with the transitional government in 2020, sided with the military.

Others, including the Sudanese Professionals Association and the Resistance Committees that were the backbone of protests against al-Bashir, rejected the deal to reinstate Hamdok and demanded power be handed over to civilians. They accused Hamdok of allowing himself to serve as a fig leaf for continued military rule.

For weeks, Hamdok failed to bridge a widening gap between the generals and the pro-democracy movement. He was unable to form a Cabinet amid relentless street protests denouncing not only the military’s takeover but also his deal with the generals.

Nearly 60 protesters have been killed and hundreds of others injured since the coup, according to a Sudanese medical group. The U.N. human rights office said it received reports that at least 13 women and girls suffered sexual violence, including rape or gang rape by security forces.

WHAT’s NEXT?

While groups leading the street protests insist that power be handed to a fully civilian government to lead the transition, the generals are not willing to step aside.

Burhan has repeatedly said the military would hand over power only to an elected government. That position is likely to prolong the stalemate as the country faces uphill security and economic challenges.

Volker Perthes, the U.N. envoy for Sudan, has urged citizens to engage in talks to find a way out of the crisis, saying the U.N. mission is ready to facilitate.

The U.S. State Department also urged Sudan’s leaders to “set aside differences, find consensus, and ensure continued civilian rule.” It called for the appointment of the next premier and Cabinet “in line with the (2019) constitutional declaration to meet the people’s goals of freedom, peace, and justice.”

Cameron Hudson, a former U.S. State Department official and Sudan expert at the Atlantic Council’s Africa Center, called for the international community to help shape what comes next in Sudan.

“It’s time for the deployment of an international mediator who can do the job Hamdok was incapable of — finding political compromise between the military, the street and the pro-democracy movement, to rewrite a roadmap for going forward,” he said.

In his resignation speech, Hamdok urged for dialogue that charts a roadmap to complete the transition to democracy and said his resignation would allow a chance for another person to complete that transition. He warned the political stalemate could become a full-blown crisis and further damage the country’s already battered economy.

“Now, our nation is going through a dangerous turning point that could threaten its entire survival unless it is urgently rectified,” Hamdok said.