Afghan presidential agreement
Afghan rival presidential candidates Abdullah Abdullah (L) and Ashraf Ghani exchange signed agreements for the country's unity government in Kabul Omar Sobhani/Reuters

The Afghan presidential candidates have signed a power-sharing agreement ending the weeks-long political standoff.

The deal between Abdullah Abdullah and Ashraf Ghani comes after several rounds of negotiations since the Afghan elections in April and June this year.

Top political leaders including outgoing president Hamid Karzai attended the signing ceremony which was broadcast live on state-run television.

"We hope that you [presidential candidates] can continue the things that the current government started," said Karzai.

Under the agreement, Ghani, the winner, will become the president while the runner-up Abdullah will be given the post of CEO, which will be equivalent to the position of prime minister.

This will be a temporary arrangement until the constitution is amended suitably to create the prime minister post.

Both the leaders will have equal powers to make appointments to key positions in the intelligence, security and economic departments.

The final official results of the presidential elections are expected to be announced shortly.

Hailing the deal, the White House said in a statement: "Signing this political agreement helps bring closure to Afghanistan's political crisis, and restores confident in the way forward.

"We support the agreement and stand ready to work with the next administration to ensure its success. Reaching this agreement required difficult choices, partnership and compromise on the part of both candidates and the outcome of their talks prioritises the recognised needs of the Afghan nation ahead of politics or individual power."

The protracted political turmoil in Afghanistan and the vacuum created by the withdrawal of Nato troops have been exploited by the Taliban to step up its insurgency.