Ashraf Ghani has been sworn is as the new president of Afghanistan in a lavish ceremony at the presidential palace in Kabul, ending months of turmoil over a fraud tainted election.

The former finance minister was inaugurated in a grand event on Monday marking the country's first democratic transfer of power since the fall of the Taliban in 2001.

"I am not better than anyone from among you. If I do any good, give me your support. If I go wrong, set me right,'' Ghani said.

Al Jazeera's Jennifer Glasse, reporting from Kabul, said: "Ghani knows it won't be an easy road with his presidency hinging on the success of the economy and security."

Ghani succeeds Hamid Karzai after a three-month standoff over disputed election results that fuelled tensions with local leaders and worsened Afghanistan's dire economic outlook.

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."

Source: Al Jazeera and agencies