Afghanistan's two presidential rivals have agreed to a historic deal to audit all eight million votes cast in the disputed election after two days of intense shuttle diplomacy by top US diplomat John Kerry.
An audible gasp rippled through a packed press conference held Saturday at the UN headquarters in Kabul as Kerry made the surprise announcement after hours of waiting, saying that vote-checking would begin within the next 24 hours.
Both candidates have vowed to stand by the results of the audit, with the winner to be declared the country's next president, who will immediately begin work to form a national unity government. The details of that are yet to be worked out.
The first ballots to be audited will be those gathered already in Kabul, while ballot boxes from all the country's provinces will be brought under high security to the Afghan capital by NATO and Afghan security forces and kept under tight guard.
Ghani, Abdullah and Kerry joined hands at the end of the news conference and raised them in triumph after securing the breakthrough, which follows a bitter standoff that raised fears of fresh violence along ethnic lines.
The deadlock over the run-off vote to choose a successor to outgoing President Hamid Karzai plunged Afghanistan into political crisis and dented US hopes of a smooth transfer of power as Washington seeks to withdraw all its troops by late 2016.
- 100 percent audit -
Preliminary results of the second-round vote released on Monday put Ghani in the lead, but Abdullah -- who has already once lost a presidential bid in controversial circumstances -- declared himself the true winner, saying massive fraud robbed him of victory.
"Both candidates have committed to participate in and abide by the results of the largest, most comprehensive possible audit. Every single ballot that was cast will be audited, 100 percent," Kerry told the news conference, which had been delayed by six hours amid last-minute shuttle diplomacy.
"This is the strongest possible signal by both candidates of the desire to restore legitimacy to the process and to Afghan democracy.
"The winner will serve as president and will immediately form a government of national unity."
But the new count will take time, and Kerry said that outgoing President Hamid Karzai had agreed to delay the inauguration which had been due on August 2.
"Let there be no doubt in keeping with each of the candidate's requests, this audit will be conducted in accordance with the highest international standards," Kerry said.
Former World Bank economist Ghani, who lagged well behind Abdullah in the first round vote in April, urged Afghans to be patient.
"We will abide by the will of the people. We will not defend any single fraudulent vote," he said.
Abdullah, wearing a suit in contrast to Ghani's traditional Afghan dress, said the two sides had reached a "technical and political agreement".
"I hope this is for the benefit of Afghan people," he said.
British Foreign Secretary William Hague congratulated the two candidates "for putting the interests of the Afghan people first".
"I hope the audit of all the votes will enable Afghans to have confidence in the electoral process and its outcome," he said.
Abdullah's victory claim on Monday inflamed tensions and prompted Washington to warn that violence or taking "extra-constitutional means" would result in a halt to US assistance to the war-torn country.
- UN calls for observers -
Karzai, constitutionally barred from serving a third term, has stayed publicly neutral in the lengthy election, but Abdullah supporters have accused him of fixing the vote in Ghani's favour.
"I welcome and support those announcements and I hope 100 percent audits will take place as soon as possible," he said after Saturday's deal.
The head of the UN mission, Jan Kubis, appealed for international observer organisations to send teams as quickly as possible to oversee the audit.
There had been fears the election row could escalate into ethnic violence along the lines of the civil war of the 1990s, as Abdullah draws his support from Tajiks and other northern Afghan groups, while Ghani is backed by Pashtun tribes of the south and east.
Thirteen years after the 2001 US invasion ousted the hardline Taliban Islamic regime, all sides are keen to maintain the gains made in such areas as literacy rates and women's rights.
But Afghan forces know they will increasingly have to stand up to a resilient and bloody Taliban insurgency on their own as international forces withdraw.
Washington also wants a signed deal on protecting US forces left in the country until late 2016.
Underlining the parlous security situation, as the leaders met in Kabul a roadside bomb in the restive southern province of Kandahar, the Taliban heartland, killed eight civilians.