Updated

U.S. Secretary of State John Kerry is opening a second day of talks in Afghanistan aimed at preventing the fragile country from collapsing into political chaos after disputed elections.

Kerry was to meet early Friday with Afghan President Hamid Karzai and later with the two men — former Foreign Minister Abdullah Abdullah and former Finance Minister Ashraf Ghani Ahmadzai — locked in a bitter dispute over who will succeed him. Kerry saw the feuding candidates separately on Thursday and U.S. officials said he hopes to bring them together for three-way talks on Friday.

Kerry is on a previously unannounced visit to Kabul to urge the candidates to accept the results of an ongoing audit of all ballots from the June election and form a national unity government by early September when NATO leaders will meet in Wales to consider their options in Afghanistan.

The U.S. believes the Sept. 4 NATO summit would be an opportunity for the eventual election winner to present himself to the alliance and introduce his new Cabinet, which, under a formula brokered by Kerry on his last visit to Kabul in June, would include the election loser appointing a new "chief executive officer," who would serve under the president. Once created, the Afghan government would convene a "loya jirga," or nationwide assembly, to formalize the chief executive post as a prime minister, the plan envisions.

Kerry's trip comes as results from the June 14 runoff are being audited in a process that he brokered last month but that had halted to mark the end the of the Muslim holy month of Ramadan in late July. The audit resumed earlier this week with representatives of both candidates participating but still at odds over charges of widespread malfeasance in the vote. Preliminary results showed Ghani Ahmadzai well ahead of Abdullah, but both sides claimed irregularities and fraud.

No details of Kerry's discussions on Thursday were available beyond the small talk the officials made while reporters and photographers were present.

However, with the clock ticking until the NATO summit, U.S. officials traveling with Kerry said he would stress the importance of the candidates looking at the "big picture" as the audit continues and not getting bogged down in endless debates over minor discrepancies that are unlikely to affect the final results.

Kerry arrived in Kabul just two days after U.S. Maj. Gen. Harold Greene was killed by an Afghan soldier at the national defense university. Greene is the most senior American soldier to be killed in the Afghan conflict and his slaying underscored the tensions that persist as the U.S. combat role winds down. The political uncertainty that Kerry is trying to address is another complicating factor in the transition.

Since his last visit, Kerry has stressed the urgency of accelerating the audit and implementing the framework agreement and has reminded the candidates that Afghans and the country's international partners need clarity from the process and confidence that they and their supporters will be able to work together to implement reforms no matter who wins.

Both candidates have pledged to sign a bilateral security agreement with the U.S. that would give legal protections to residual American forces, but Washington would like the pact in place as soon as possible.