A top Afghan election official resigned Monday, heeding the demands of a presidential candidate and offering hope that the fragile electoral process that is underway will not devolve into violence.

Ziaulhaq Amarkhil, the country’s chief election officer, agreed to step down after Abdullah Abdullah — one of two presidential candidates who took part in a runoff vote June 14 — accused him of facilitating electoral fraud on behalf of Ashraf Ghani, Abdullah’s opponent.

Amarkhil denied wrongdoing but said his resignation was “for the good of the country.”

Abdullah responded promptly to the resignation, calling it a step in the right direction but saying that he is still not ready to trust the election commission to produce legitimate results.

“The door is now opened for us to talk to the commission and talk about the conditions and circumstances which will help the process,” he said.

Abdullah has suggested that the United Nations could provide additional oversight as the commission counts valid votes and weeds out fraudulent ones. The commission has already received millions of dollars in funding and training from the United Nations and the United States.

Abdullah raised questions about Amarkhil’s impartiality Sunday by playing recorded telephone conversations allegedly of Amarkhil encouraging election officials to support Ghani and possibly encouraging ballot stuffing. The authenticity of the recordings could not be verified.

Last week, Abdullah said he would not recognize results due to be issued next month by Afghanistan’s Independent Election Commission, arguing that fraud had rendered them illegitimate. Within days, his supporters took to the streets in small demonstrations that they said would get larger and more disruptive.

Alarm spiked within the international community.

“With the utmost concern, the U.N. Mission notes that appeals to circumvent or abandon the legal process and framework and appeal directly to supporters could incite violence,” the U.N. Mission said in a statement.

While Monday’s announcement seemed a small step toward the resumption of the electoral process in Kabul, many here remained worried about what will happen when the official results are released.

In an interview, Abdullah’s vice-presidential running mate, Mohammad Mohaqiq, said he was sure Abdullah had won by more than a million votes.

If the election commission announces a Ghani victory, he said, “Afghanistan will be paralyzed.”

Sayed Salahuddin and Mohammad Sharif contributed to this report.