Afghanistan's President Ashraf Ghani took the oath of office for a second term on Monday, after polls closed on April 5 and his rival he narrowly defeated, former Foreign Minister Abdullah Abdullah, challenged the result in a bitterly contested court case.

The Electoral Complaints Commission, a panel of legal experts, said on Monday that Abdullah had failed to produce sufficient evidence to establish that he had won the election.

Afghanistan's election officials delivered the preliminary election results on Sunday, amid predictions that the winning margin could be as high as 3.5 million votes. The president received 5.8 million and Abdullah 1.7 million votes, according to early results. Both figures were preliminary and the final results will be released in mid-April.

The move marks the culmination of a bitterly fought battle that divided the political elite and was deeply resented by many Afghans. It has presented a dilemma for the United States and Afghanistan as to whether they should congratulate Ghani or pull their support of his second term.

On Monday, Secretary of State John Kerry met with Ghani and spoke with Abdullah in the event of a court dispute over the results. The United States and some other Western nations have welcomed the results of the vote, including the relatively clean ballot, which many had predicted was heading toward a contested election.