Afghanistan's rival presidential candidates have agreed to form a national unity government following disputed elections.
Abdullah Abdullah and Ashraf Ghani signed a joint declaration confirming they would cooperate on forming a unity government after an audit of votes from June's presidential election runoff is completed.
Abdullah said the agreement was "another step forward in the interests of strengthening national unity in the country...and also bringing hope for the better future of the people of Afghanistan."
Ghani said, "We will work with each other to fulfil this national duty and obligation for every Afghan."
The audit was initiated after Abdullah charged that large-scale fraud had been undertaken in Ghani's favor.
The breakthrough came as U.S. Secretary of State John Kerry held a second day of talks in Kabul in an effort to convince the two candidates to resolve their dispute.
Kerry said the agreement reached on August 8 was "an Afghan solution to an Afghan problem." He said it marked a "pivotal time" in Afghanistan's future.
The joint declaration states the candidates would agree to an inauguration date for the next president by the end of August.
There were no immediate details on the structure of the future government under the power-sharing deal.
Kerry, who arrived in Kabul on August 7, held talks earlier with both Abdullah and Ghani, his second visit to Kabul in less than one month.
The rival presidential candidates agreed to an audit of all 8 million votes cast in the June election during Kerry's visit last month.
Both candidates have said they will abide by the audit's result.
Preliminary results from June's second round showed Ghani well ahead of Abdullah, who was leading in the first round of the election.
The United States and its allies hope an audit of the votes will produce a legitimate president before a NATO summit in early September.
The election was to mark Afghanistan's first democratic transfer of power before most foreign troops pull out at the end of 2014.