Ashraf Ghani looks on as he prays during a gathering in Kabul on Monday. Ghani and Abdullah Abdullah struck an agreement on Sunday to form a "unity government".

AFP/Kabul

Afghan President-elect Ashraf Ghani congratulated the country on Monday on what he called its first democratic transfer of power, but the former rival with whom he signed a power-sharing deal was absent from the celebrations.

Ghani and Abdullah Abdullah struck an agreement on Sunday to form a "unity government", after months of disputes over who was the rightful winner of the fraud-tainted June 14 presidential election.

The bitter stand-off tipped Afghanistan into a political crisis, weakened the aid-dependent economy and emboldened Taliban insurgents who have launched several major offensives in recent months.

The two men must now govern Afghanistan as international funding declines and US-led combat troops pull out by the end of this year after fighting the Taliban since 2001.

"It is a big victory for the Afghan nation that for the first time in our bright history, power is transferred from one elected president to another president based on the people's votes," Ghani told cheering supporters in Kabul.

In the "national unity government", Ghani will become president and Abdullah will serve as chief executive - a new role similar to prime minister.

The chief executive could become the official prime minister in two years' time - a major change to the strongly presidential style of government laid out in the constitution.

Coalition relations could prove tricky after the two campaigns traded allegations of ballot-box stuffing in the race to succeed President Hamid Karzai, who will hand over power at an inauguration ceremony next week.

"Foreigners said it was not possible for Afghans to peacefully transfer power," Ghani told a crowd of noisy supporters in a nationally televised speech.

"Now you see it has happened after the people of Afghanistan waited very patiently for six months for the results," he said, referring to the first-round vote in April.

"You voted for us so we could bring peace and stability. Stability in Afghanistan is more important to us than anything.

"The goal of the national unity government is peace. We are tired of blood."

The Taliban on Monday described the power-sharing deal as a US plot to control Afghanistan.

"Installing Ashraf Ghani and making a new administration is not acceptable to Afghans," the insurgent group said in a statement.

"Just as the election was shameful and fake, so was the result, and Afghans have always rejected puppet governments throughout history."

Abdullah and his supporters did not attend Ghani's speech, and were not immediately available for comment.

Election officials on Sunday named Ghani as the winner, but declined to release the margin of victory or the turnout figure - triggering accusations of lack of transparency.

With fears growing that the stand-off could revive the ethnic violence of the 1990s civil war, the outcome was widely welcomed by UN, US and other countries.

Related Story