KABUL, Afghanistan (AP) -- Afghanistan's two presidential candidates signed a power-sharing deal Sunday, capped with a hug and a handshake, three months after a disputed runoff that threatened to plunge the country into turmoil and complicate the withdrawal of U.S. and foreign troops.
The incoming president - Ashraf Ghani Ahmadzai - and Abdullah Abdullah signed the national unity government deal as President Hamid Karzai - in power since the 2001 U.S.-led invasion ousted the Taliban - looked on. The deal creates the new role of chief executive for Abdullah following weeks of negotiations on a power-sharing arrangement after accusations of fraud in the June runoff vote.
"I am very happy today that both of my brothers, Dr. Ashraf Ghani and Dr. Abdullah Abdullah, in an Afghan agreement for the benefit of this country, for the progress and development of this country, that they agreed on the structure affirming the new government of Afghanistan," Karzai said after the signing.
The deal is a victory for U.S. Secretary of State John Kerry, who first got the candidates to agree in principle to share power during a July visit to Afghanistan. Kerry returned to Kabul in August and has spent hours with the candidates in repeated phone calls in an effort to seal the deal.
A White House statement lauded the two leaders, saying the agreement helps bring closure to Afghanistan's political crisis.
"This agreement marks an important opportunity for unity and increased stability in Afghanistan. We continue to call on all Afghans - including political, religious, and civil society leaders - to support this agreement and to come together in calling for cooperation and calm," the White House statement said.
Jan Kubis, the top U.N. official in Afghanistan, said the uncertainty of the past months took a heavy toll on Afghanistan's security, economy and governance.
An inauguration ceremony to see Ghani Ahmadzai replace Karzai as president and swear in Abdullah as chief executive -- a position akin to prime minister -- was expected within days. No official announcement on an inauguration timetable was immediately made. The election commission said it would release official vote totals later Sunday.
As talks dragged on, Abdullah's mostly northern supporters had threatened to form a parallel government or react violently to any outright victory by Ghani Adhmadzai, a former finance minister and World Bank official whose power base is in the country's south and east. Ghani Ahmadzai said he always maintained that ethnic politics in Afghanistan demand some sort of power sharing deal and not a winner-takes-all government.
Abdullah believes he won the first round of the election back in April with more than 50 percent of the vote, which would have precluded a runoff. But the official results showed him winning about 45 percent of that vote in a crowded presidential field of 10, not quite enough for an outright victory.
He also believes he won a June runoff with Ghani Ahmadzai. But official totals show Ghani Ahmadzai with about 55 percent of the vote.
Though the White House statement said that "respect for the democratic process" it the only viable path forward for Afghanistan, the next Afghan government is more the product of negotiations than vote tallies. Though the vote recount gave Ghani Ahmadzai the win, the political deal he signed on to reduces the power of the presidency significantly.
Shekiba Hashimi, a lawmaker from the southern province of Kandahar, said she was happy not only as a member of parliament "but as a woman and a mother" that the candidates reached a deal and moved the country forward.
"We are in a very sensitive situation, not only from a security point of view or an economic or political point of view. The enemies of the Afghan nation were benefitting from this stalemate. Recent big and complex attacks in southern and southeastern provinces are examples," she said.
A power-sharing deal was almost sealed about a week ago, but Abdullah then demanded that no vote totals from the runoff be released.
U.N. and Afghan election officials spent weeks auditing the runoff results after allegations of fraud, a common occurrence over Afghanistan's last two presidential elections. But Ghani Ahmadzai's runoff vote total only dropped by about 1 percent after the audit. Abdullah's side maintained the fraud was so sophisticated it was undetectable.
The U.S. has been pushing for a resolution so the next president can sign a security agreement that would allow about 10,000 U.S. forces to remain in the country after combat operations wrap up at the end of the year.