Afghanistan's President Ashraf Ghani has been declared the winner of last September's election following delays due to allegations of vote-rigging.
Mr Ghani was re-elected with 50.64% of the vote, officials said.
But his main rival Abdullah Abdullah, who came second with 39.52%, contested the result, declared victory, and vowed to form his own parallel government.
Opponents of Mr Ghani said the 28 September vote was marred by massive fraud and technical problems.
Only a small proportion of the country voted in the election.
Election commission chief Hawa Alam Nuristani announced the result during a press conference in Kabul. She said 137,000 votes classed as suspicious and 12,012 votes cast outside polling hours had been found to be valid during a special audit.
She said: "May God help him in serving the people of Afghanistan... I also pray that peace comes to our country."
Mr Abdullah, however, rejected the results and proclaimed victory.
"Our team, based on clean and biometric votes, is the victor and we declare our victory. The fraudsters are the shame of history and we announce our inclusive government," he told a press conference in Kabul.
Turnout was also the lowest since the Taliban were ousted in 2001, with just 1.82m votes counted. Nearly one million votes were discarded due to irregularities. Afghanistan's total population stands at about 37 million, with 9.6 million registered voters.
The low turnout was in part attributed to widespread safety concerns as the Taliban had threatened to attack polling stations and targeted election rallies before polling day.
But there was also a perceived lack of enthusiasm ahead of the vote - not helped by the fact the same two men who had fought for months over the top job in 2014 were the front-runners once again. Both have been accused of corruption while in office.
The announcement comes as the US seeks to sign a deal with the Taliban who refuse to negotiate directly with the Afghan government, saying it is illegitimate. They say they will only talk to Afghan authorities after a deal with the US is agreed.
Mr Ghani, 70, has insisted on taking part in any future negotiations with the Taliban. He has vowed to fight them "for generations" if such talks fail.