Sudan’s Prime Minister Abdalla Hamdok announced his resignation Sunday amid political deadlock and widespread pro-democracy protests following a military coup that derailed the country’s fragile transition to democratic rule.

Hamdok, a former U.N. official seen as the civilian face of Sudan’s transitional government, had been reinstated as prime minister in November as part of an agreement with the military following the October coup. In that time he had failed to name a Cabinet and his resignation throws Sudan into political uncertainty amid uphill security and economic challenges.

In a televised national address Sunday, Hamdok called for a dialogue to agree on a “national charter” and to “draw a roadmap” to complete the transition to democracy in accordance with the 2019 constitutional document governing the transitional period.

“I decided to return the responsibility and declare my resignation as prime minister,” he said, adding that his stepping down would allow a chance for another person to lead the nation and complete its transition to a “civilian, democratic country.” He did not name a successor.

The prime minister said his efforts to bridge the widening gap and settle disputes among the political forces have failed.

He warned that the ongoing political stalemate since the military takeover could become a full-blown crisis and damage the country’s already battered economy.

“I tried as much as I possibly could to prevent our country from sliding into a disaster. Now, our nation is going through a dangerous turning point that could threaten its survival unless it is urgently rectified,” he said.

The October coup had upended Sudan’s plans to move to democracy after a popular uprising forced the military’s overthrow of longtime autocrat Omar al-Bashir and his Islamist government in April 2019.

Four months after al-Bashir’s ouster, the generals and the protesters reached a power-sharing deal to rule the country through elections in 2023. However, military-civilian ties have been frayed by the military takeover that has threatened to return Sudan to international isolation.

Hamdok’s resignation comes amid a heavy security crackdown on protesters denouncing not only the takeover but the subsequent deal that reinstated him and sidelined the pro-democracy movement. He was returned to office in November amid international pressure in a deal that calls for an independent technocratic Cabinet under military oversight led by him.

“I have had the honor of serving my country people for more than two years. And during his period I have sometimes done well, and I have sometimes failed,” Hamdok said.

The Forces for the Declaration of Freedom and Change, an umbrella group of Sudanese political parties and pro-democracy organizations, has rejected the November deal and sa remains committed to ending military rule. The alliance accused Hamdok of allowing the military to dominate the government, and continued to organize anti-coup street protests which were met with heavy crackdown.

Over the past two weeks, there was increasing speculation that he would step down. National and international efforts have failed to convince him to stay in office.

The U.S. State Department urged on Twitter Sudan’s leaders to “set aside differences, find consensus, and ensure continued civilian rule” following Hamdok’s resignation.

It also called for the appointment of the next premier and Cabinet to “in line with the (2019) constitutional declaration to meet the people’s goals of freedom, peace, and justice.”

“Its 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 FFC, to rewrite a roadmap for going forward,” said Cameron Hudson, a former U.S. State Department official and Sudan expert at the Atlantic Council’s Africa Center

Hours before Hamdok’s resignation speech, Sudanese security forces violently dispersed pro-democracy protesters, killing at least three people, according the the Sudan Doctors Committee, which is part of the pro-democracy movement. The group said dozens of protesters were injured.

The protests came despite tightened security and blocked bridges and roads in Khartoum and Omdurman. Internet connections were also disrupted ahead of the protests, according to advocacy group NetBlocs. Authorities have used such tactics repeatedly since the Oct. 25 coup.

Sunday’s fatalities have brought the death toll among protesters since the coup to at least 57, according to the medical group. Hundreds have also been wounded.

Allegations surfaced last month of sexual violence, including rape and gang rape by security forces against female protesters, according to the United Nations.

The ruling sovereign council has vowed to investigate violence against the protesters.

On Saturday, U.S. Secretary of State Antony Blinken urged security forces to “immediately cease the use of deadly force against protesters” and to hold those responsible for violence accountable.

“We do not want to return to the past, and are prepared to respond to those who seek to block the aspirations of the Sudanese people for a civilian-led, democratic government,” he added.