After a much-contested presidential election in Afghanistan, the two candidates created a shared-power agreement to move forward in the democracy, a move that has been applauded by the Obama administration.

Between the two candidates, Ashraf Ghani becomes president, and Abdullah Abdullah takes the newly created post of chief executive, USA Today reported.

"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 a statement Sunday, USA Today reported. "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 compromise comes months after the June 14 election, in which 8 million votes were cast and the U.S. State Department said at least 3 million of those could be involved in an audit, which was announced July 8, involving 7,000 polling stations, Fox News reported.

The concern was the number of votes was enough to alter the results, which it later became known that an audit gave Ghani a lead of 1 million votes.

President Barack Obama was said to have called both parties and asked for peace during the audit process, while an Aug. 2 inauguration loomed.

The date of inauguration came and passed, and as tensions continued, no president had been named. The American government encouraged peace -- as U.S. troops being removed were at stake.

A deal was agreed upon but soon unraveled with fistfights breaking out in the auditing center, the Guardian reported. Adbudallah, a former mujahideen doctor, wanted clarity on the agreement, and Ghani, a former World Bank technocrat, wanted to wait until the audit was over to agree.

Secretary of State John Kerry, who brokered the deal between the two in July, said that the acceptance of the agreement was a monumental step forward.

Afghanistan has emerged stronger from this test of its politics, Kerry said.