Afghanistan's election commission has declared Ashraf Ghani the winner of the country's disputed presidential election.
The commission's announcement on Sunday came hours after Ghani signed a power sharing agreement with rival Abdullah Abdullah, who will fill the newly created position of government chief executive.
The final vote tally from a UN-audit was not released by the commission, but its chairman, Ahmad Yousuf Nuristani, acknowledged grave flaws in the election process and said that the UN audit could not detect all voting issues.
The unity deal reached on Saturday puts an end to months of political turmoil following June's presidential elections which both candidates claimed victory in, destablising the nation at a time when US-led NATO combat troops prepared to leave after 13 years of fighting the Taliban.
The White House welcomed Sunday's power-sharing deal, which it said "helps bring closure to Afghanistan's political crisis".
Preliminary results released in July showed Ghani ahead of ex-foreign minister Abdullah with 56 percent of the vote.
The early results prompted street protests from supporters of Abdullah, who charged massive fraud and said he was the rightful winner.
Final results have been delayed for weeks by a UN-monitored audit of all eight million ballots cast in the June 14 runoff vote between Ghani and Abdullah, the top finishers of the first round in April.
Under the Afghan constitution, the president wields almost total control, and the new government structure will face a major test as the security and economic outlook worsens.
Ghani, who has previously worked at the United Nations and the World Bank, hails from an influential Pashtun family.
He secured less than three percent in his 2009 bid in the presidential elections.