KABUL, July 11 (Reuters) - U.S. Secretary of State John Kerry said on Friday Afghanistan's transition to a self-reliant state hung in the balance after a contested presidential election and urged Afghan officials to focus on auditing the vote count to underpin its legitimacy.

Kerry arrived in the Afghan capital in the early hours of Friday in a hastily arranged visit for talks with the two presidential contenders, Abdullah Abdullah and Ashraf Ghani, as well as incumbent Hamid Karzai and other senior officials.

Preliminary results from a June 14 run-off round put Ghani, a former World Bank official, in the lead with 56.4 percent of the vote, almost one million votes ahead of Abdullah.

Abdullah rejected the result, calling it a "coup" against the people and dismissing the vote as invalid because of widespread fraud. His aides have threatened to set up an alternative administration.

Kerry rushed to Kabul from meetings in Beijing to try to mediate between the camps and guard against any attempt at a power grab.

"The election legitimacy hangs in the balance, the future potential of the transition hangs in the balance, so we have a lot to do," Kerry said as he began his first meeting of the day with U.N. special envoy to Afghanistan Jan Kubis.

"Our hopes are that there is a road that can be found that will provide that capacity for the questions to be answered, for people's doubts to be satisfied, and hopefully for a future to be defined. But I can't tell you that that's going to be an automatic at this point."

U.S. officials Kerry would urge both contenders to agree on a review "of all reasonable allegations of fraud", which would entail additional audits of the vote count.

Kerry was also due to meet Afghan Interior Minister Mohammad Omar Daudzai, a man tipped as head of a possible interim government - a last-resort scenario possible if the current deadlock is not resolved promptly.

LEGITIMATE VOTE

Ghani, speaking later, just before the start of his talks with Kerry, said he favoured a comprehensive audit.

"Our commitment is to ensure that the election process enjoys the integrity and the legitimacy that the people of Afghanistan and the world will believe in," he said.

"Therefore we believe in the most intensive and extensive audit possible to restore faith."

Kerry replied: "No one is declaring victory at this time. The results have yet to be finalised and so those questions have to be resolved and I'm very appreciative that Dr Ghani respects that."

State Department spokeswoman Jen Psaki told Reuters there an agreement on a broad review of the votes would be an initial step to enable the candidates to talk through their differences.

"Secretary Kerry's goal is to help the parties find a way forward that ensures that the next president of Afghanistan has a credible mandate to lead a unified Afghanistan," she said.

The United believes that the results of the final tally in the second round should not be released until the audits have been completed. Washington considers the results thus far to be preliminary.

Abdullah is a former anti-Taliban resistance fighter. His father is a Pashtun, Afghanistan's largest ethnic group, while his mother comes from the Tajik minority. Ghani has strong support from Pashtun tribes in the south and east.

Kerry has warned that any effort to resolve the dispute through violence or any "extra-constitutional means," would cause the United States to withdraw assistance to Afghanistan.

The United States is in the process of withdrawing its forces from the country after 12 years of fighting Taliban insurgents, but remains the country's biggest foreign donor, helping to fund the operations of the Afghan government.

A senior State Department official said if Washington withdrew support, other donors would likely follow and that would have a significant impact on the government's actions.

"Both sides have expressed to the secretary that they want to get to an outcome that is credible, transparent and accepting," the official told reporters en route to Kabul, speaking on condition of anonymity.

"We're not asking them to do something they don't want themselves." (Reporting by Lesley Wroughton; editing by G Crosse, Peter Cooney and Ron Popeski)

We welcome comments that advance the story through relevant opinion, anecdotes, links and data. If you see a comment that you believe is irrelevant or inappropriate, you can flag it to our editors by using the report abuse links. Views expressed in the comments do not represent those of the Thomson Reuters Foundation. For more information see our Acceptable Use Policy.