Both Ghani and his poll rival Abdullah Abdullah claimed to have won the fraud-tainted June 14 election, plunging Afghanistan into a crisis that threatened to trigger nationwide unrest.

But, under heavy pressure from the US and UN, the two candidates eventually agreed to form a national unity government, and Ghani was declared president after an audit of nearly eight million ballot papers.

Moments after Ghani took the oath, Abdullah was sworn in as chief executive, a new role with powers similar to those of a prime minister that was created to break the election deadlock.

Afghan historian, Helena Malikyar, told Al Jazeera it was a "bitter-sweet day for most Afghans".

"The economy is in shambles, foreign aid has frozen, development has stopped and crime has risen tremendously," Malikyar said.

Afghanistan's security problems were underlined in the run-up to the event when the Taliban launched a series of attacks, including a suicide attack on a local government headquarters in the eastern Paktia province, killing 10 people.

"We made a lot of effort to bring about a long-lasting peace, but unfortunately our hopes did not fully materialise, but I should say that peace will surely come," Karzai said in an emotional farewell speech to the nation late Sunday.

"I will transfer government responsibilities to the elected president tomorrow and will start my new life as a citizen of Afghanistan.

"I will strongly support the new president, the government and the constitution and will be at their service."