Washington: The United States welcomed an Afghan power-sharing deal on Sunday that ended months of tensions over disputed election results, hailing it as an “important opportunity for unity.”

The deal between Ashraf Gani and Abdullah Abdullah broke a three-month deadlock over allegations of massive electoral fraud that plunged Afghanistan into crisis as US-led troops end their 13-year war against the Taliban.

Both Gani and Abdullah claimed to have won the vote, but Gani is widely reported to have come out ahead after a UN-supervised audit of all eight million ballot papers.

“Signing this political agreement helps bring closure to Afghanistan’s political crisis, and restores confidence in the way forward,” White House spokesman Josh Earnest said in a statement.

“We support this agreement and stand ready to work with the next administration to ensure its success.”

He said the deal “prioritises the recognised needs of the Afghan nation ahead of politics or individual power.”

Under Sunday’s deal, Abdullah will nominate his choice for the new post of “chief executive officer” (CEO), which will be similar to prime minister — setting up a tricky balance of power as Afghanistan enters a new era.

“This agreement marks an important opportunity for unity and increased stability in Afghanistan,” Earnest said.

“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.”

US Secretary of State John Kerry congratulated Afghanistan for what it called a “moment of extraordinary statesmanship.”

He spoke of a “new chapter in our enduring partnership with Afghanistan.”

“These two men have put the people of Afghanistan first, and they’ve ensured that the first peaceful democratic transition in the history of their country begins with national unity,” he added.

Speaking of an “enormous opportunity” for Afghanistan to emerge stronger after the agreement, the top US diplomat stressed that “elections are not the end.”

“They must be the beginning, where Afghanistan and its people move forward on a reform agenda and make improvements to the electoral process,” he added.

“The United States remains determined to honour the Afghan people’s historic achievement by helping their transition succeed.”