(Recasts; adds comment from U.S. official, meetings, background)
By Lesley Wroughton
KABUL, July 11 U.S. Secretary of State John Kerry held meetings late into the night on Friday in an effort to resolve Afghanistan's disputed presidential election, warning the two candidates that the country's transition to a self-reliant state hung in the balance unless the credibility of the vote was restored.
The deadlock over the vote has raised concerns about a smooth transition of power in Afghanistan, a concern for Washington as most U.S.-led forces withdraw from the country this year.
Kerry had rushed to Kabul earlier on Friday in a hastily-arranged visit for talks with the two presidential contenders, Abdullah Abdullah and Ashraf Ghani, as well as incumbent President Hamid Karzai and other Afghan officials.
A senior U.S. official said Kerry would hold a second round of talks on Saturday with all sides to weigh several ideas.
Speaking on condition of anonymity, the official said conversations focused on ways to ensure a thorough review of the vote count that would be acceptable to both sides as well as ideas for building an inclusive and broad-based national government.
Asked whether the possibility of a unity government was raised, the official said: "We certainly hope that it is a government that is unified, but I'm not going to define what that looks like."
"A lot of the conversations were being (held) in listening mode, hearing what was important to the candidates and their constituents, and trying to assess what was out there," the official said, describing the conversations as constructive and substantive.
Preliminary results from a June 14 runoff vote put Ghani, a former World Bank official, in the lead, but Abdullah rejected the result, calling it a "coup" against the people and his aides have threatened to set up an alternative administration.
"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 before his meetings with Jan Kubis, the U.N. special envoy to Afghanistan.
"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 said there were several ideas currently being discussed among the parties to resolve the crisis. During both meetings with the presidential contenders, Kerry said the United States considered the vote results as preliminary.
Abdullah's rejection of the outcome has set the stage for a possible bloody standoff between ethnic groups or even secession of parts of the fragile country, which is already deeply divided along tribal lines.
Ghani, speaking earlier, 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."
Abdullah, for his part, said after meeting Kerry: "At a very critical time, you have proved your commitment to Afghanistan, to saving Afghanistan and saving the democratic process here."
U.S. State Department spokeswoman Jen Psaki told Reuters that 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 States believes the results of the final tally in the second round should not be released until the audits have been completed.
Abdullah, a former anti-Taliban resistance fighter, draws his support from the Tajik minority in the north of the country. 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 were likely to 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." (Writing by Lesley Wroughton and Maria Golovnina; editing by Clarence Fernandez and G Crosse)