Afghanistan's chief electoral officer has resigned in a bid to resolve a political crisis over allegations of fraud in the run-off presidential vote earlier this month.
Zia ul-Haq Amarkhail said on Monday that he denied any involvement in fraud but he is stepping down "for the national interest".
The stand-off has forced the main election commission to hold off on releasing partial results from the June 14 run-off vote that pitted Abdullah Abdullah, a former foreign minister, against Ashraf Ghani Ahmadzai, a former finance minister and World Bank official.
Whoever wins will lead the country as it undergoes a major transition from rule by President Hamid Karzai, the only leader it has known since the 2001 US-led invasion that toppled the Taliban.
He also will face a strong challenge to end violence and improve the economy despite a resilient Taliban insurgency and declining foreign aid.
Abdullah had said his campaign monitors had recorded ballot-box stuffing and other irregularities.
He suspended cooperation with the vote-counting process and demanded Amarkhail be suspended, claiming the electoral official helped engineer the vote-rigging.
Abdullah received news of Amarkhail's resignation as he was holding a news conference on Monday.
"The door is now open for us to talk to the commission and talk about the conditions and circumstances that will help the process," he said.
"We do believe in transparency of the process and we will defend the legitimacy of the process."
Abdullah won the first round but failed to gain the majority needed to avoid a run-off.
He raised his allegations before any results were released, saying he had to act pre-emptively because reports by up to 50,000 campaign monitors deployed at the polls showed Ahmadzai coming from behind with an unrealistic lead.
Amarkhail defended the conduct of the vote and called on Abdullah to resume relations with the Independent Election Commission and honour an agreement to respect its decisions.
"I want to say that there has not been any pressure on me to resign," he said at a news conference.
"The only reason for my resignation is the national interest of my country so now Dr Abdullah should end his boycott and ... and should respect the code of conduct that he had signed with the commission on the first day."
According to the election commission's official timetable, preliminary results are due on July 2, and final results on July 23. Karzai has set August 2 as the date for the new president to be inaugurated.
In a statement, the UN mission in Afghanistan called Amarkhail's resignation "a step that helps protect Afghanistan's historic political transition and contributes to an orderly and timely electoral process under the country's legal and institutional framework and through its mandated electoral institutions and their procedures".
Both candidates have promised to sign a security pact with the Obama administration that would allow nearly 10,000 American forces to remain in the country in a training capacity and to conduct counter-terrorism operations.
A disruption in the announcement of election results could mean another delay in finalising that agreement, which was rebuffed by Karzai.
Western officials have long said they anticipated irregularities and the determining factor would be whether the vote rigging was sufficient to affect the overall outcome.
The 2009 re-election of Karzai was marred by widespread ballot box stuffing and proxy voting, leading Abdullah, who was runner-up at the time, to refuse to participate in the run-off.