Secretary of State John Kerry’s hastily brokered agreement to resolve Afghanistan’s presidential election crisis is failing as the two rival candidates continue to disagree over multiple points contained in the emergency deal, leaving the war-torn nation on the brink of collapse and threatening to destroy national security gains made by the U.S. against a growing and more violent Taliban.

Kerry last month issued an ultimatum to the candidates that the U.S. would pull all of its troops by summer’s end and cut financial assistance if they couldn’t reach a compromise. Kerry’s deal requires the creation of a unity government, whereby the winner of the election becomes president and the runner up takes a newly created post of chief executive. After two years, the president is required to hold a traditional gathering of elders and politicians, known as a loya jirga, where they will officially vote to create a prime minister position in the cabinet.

But neither former Afghan Finance Minister Ashraf Ghani and former Foreign Minister Abdullah Abdullah can agree on the technical details of the current ballot audit being conducted by Afghanistan’s Independent Election Commission. They’ve been in a standoff over allegations of fraud following the June runoff, which was mandated under Afghanistan’s constitution because no candidate in the April general election surpassed 50 percent of the vote.

They’re also battling over the exact power-sharing terms under a unity government and differ sharply on whether to reconcile with the Taliban. All told, the two candidates began to sour on the deal shortly after their last meeting with Kerry on July 12, according to several Afghan and a U.S. sources familiar with the crisis.

“Kerry’s diplomacy is ad hoc and it’s not as though this crisis wasn’t anticipated or disputed by the White House,” a former senior Afghan official told TheBlaze. “During the election when the situation was on knife’s edge, the United States stood still and did nothing. The White House has taken a beating over Iraq and doesn’t want the same beating over Afghanistan. How can we expect to do counterterrorism missions in this part of the world for years to come, build trust with allies, if we don’t resolve this political crisis before the drawdown?”

An Afghan man fills his ballot before voting at a polling station in Jalalabad, east of Kabul, Afghanistan, Saturday, April 5, 2014. Afghan voters lined up for blocks at polling stations nationwide on Saturday, defying a threat of violence by the Taliban to cast ballots in what promises to be the nation's first democratic transfer of power. (AP Photo/Rahmat Gul)

An Afghan man fills his ballot before voting at a polling station in Jalalabad, east of Kabul, Afghanistan, April 5, 2014. (AP/Rahmat Gul)

The situation became urgent for the Obama administration “when it became apparent that a resolution to the allegations of fraud in the presidential elections was highly unlikely by either candidate,” a current U.S. military official in Afghanistan told TheBlaze. “If we can’t make this work, what do all the American lives lost mean? We have a national security interest [in Afghanistan] that needs to be protected if we’re going to protect ourselves from the increasing threat of extremists.”

After planning another trip to Afghanistan for Friday, Kerry unexpectedly canceled it on Wednesday, according to senior Afghan sources who knew of the meeting. Instead, just as Afghan officials were notified by the U.S. Embassy in Kabul that he would not be coming, Kerry published an op-ed in Afghanistan’s TOLOnews that effectively put the details of any deal into the hands of the candidates.

“The challenge now is to translate that agreement into a strong working relationship in the new government, whoever wins,” Kerry said. “The time for politics is over. The time for cooperation is at hand. There is no time to waste.”

Afghan officials, however, say it’s the Obama administration that’s wasted time and is now scrambling at the last minute.

“Both camps [Ghani and Abdullah] are puzzled and full of speculation,” the former top Afghan official said.  ”It indicates the U.S. has very limited interest in following up the deal it brokered. Whatever the reason for Kerry’s cancellation, the impression is that U.S. does not want to invest the time to resolve this issue. It is very risky for U.S., Afghanistan  and the region to give that impression at this critical juncture.”

Afghan presidential candidate Abdullah Abdullah, center, shakes hands with U.S. Secretary of State John Kerry at the start of a meeting at the U.S. Embassy in Kabul, Friday, July 11, 2014. Kerry sought Friday to broker a deal between Afghanistan's rival presidential candidates as a bitter dispute over last month's runoff election risked spiraling out of control. (AP Photo/Jim Bourg, Pool) AP Photo/Jim Bourg, Pool

Afghan presidential candidate Abdullah Abdullah, center, shakes hands with U.S. Secretary of State John Kerry at the start of a meeting at the U.S. Embassy in Kabul, July 11, 2014. (AP Photo/Jim Bourg, Pool)

Abdullah, who received the most votes in the first election in April — 45 percent to Ghani’s nearly 31.5 percent — was looking like a far second during the first set of ballots counted from the June runoff.

Afghanistan’s election commission said Ghani was leading in the runoff with 56.44 percent of the vote to Abdullah’s 43 percent, as detailed by the New York Times. Abdullah accused Ghani supporters of massive ballot-box stuffing and demanded a recount; Abdullah supporters threatened to form a breakaway government.

Even U.S. officials and election observers said the numbers didn’t add up.

Bruce Riedel, a 30-year veteran of the CIA and senior fellow and director of the Brookings Intelligence Project at the Brookings Institute, said the election crisis is putting the future of Afghanistan at a critical point.

“Ghani’s numbers for the second round don’t wash, he and his vice presidential candidate [Abdul Rashid] Dostam are pushing Afghanistan to the edge,” Riedel said.

The ongoing, unforgiving audit — which consists of 23,000 ballot boxes containing roughly 8.1 million votes — has been suspended three times since it began. It was suspended again on Thursday as disagreements arose between the candidates about which ballots should be counted and what ballots should be thrown out. It is expected to resume Saturday, according to news reports.

‘All the Blame on the Afghans if It All Goes Downhill’

At the time Kerry released his op-ed Thursday regarding the election turmoil, he was in neighboring India, promising Indian Prime Minister Narendra Modi that the U.S. wanted to strengthen economic ties and trade, according to the BBC.

His message to Afghanistan was direct: Resolve your crisis yourselves, because it’s “not for outsiders to describe the contents of the political framework both candidates accepted a few days ago.”

Former Afghan Official: John Kerry Has Prepared the Ground for Absolving the Obama Administration on Afghanistan

Afghan presidential candidate and former Foreign Affairs Minister Abdullah Abdullah speaks during an interview with The Associated Press at his residence in Kabul, Afghanistan, July 15, 2014. (AP Photo/Massoud Hossaini)

“Kerry prepared the ground for absolving the Obama administration of any damage and placed all the blame on the Afghans if it all goes downhill from here,” the former Afghan official said. “It’s incredible.”

Reidel, who also chaired Obama’s Afghanistan Pakistan strategy at the beginning of his presidency warned, “Afghanistan is on a precipice.”

“If the election audit does not provide an honest solution accepted by both Ghani and Abdallah and their supporters, the Kabul regime could collapse,” he said.

On July 25, President Barack Obama made direct personal calls to each candidate and made clear he wants a resolution, Afghan officials told TheBlaze.

A State Department official told TheBlaze that “given the complexity and unprecedented scope of this effort, it is not surprising that issues arise and pauses to assess and address concerns must be taken.”

“While both candidates are hoping to lead Afghanistan they also must begin to work together on the specific challenges that will face the new government of national unity they have agreed to form,” the official added.

But there is little trust left for Obama in Afghanistan: The country is struggling to keep some semblance of governance, even as the Taliban continues to threaten the gains made by the U.S. and NATO during the last 13 years of war.

The former senior Afghan official and a current Afghan official said that the rush to broker peace with short term deal has set the nation up for failure.

“There is a long history of tension, acrimony and recrimination between these two presidential contenders,” the former senior Afghan official said. “And trying to forge unity and one unified front between these two, ignores that history. Kerry misread the situation,  thinking ‘perhaps if we distribute the power between these two we’ll resolve the crisis.’ This is a flawed assumption. There are deeper issues between these two men.”

The Broken Wrist 

Sparks started to fly at a National Economic Council meeting in 2002. The meeting, which was attended by then-Foreign Minister Abdullah and Finance Minister Ghani, ended in an explosive verbal match between the two future candidates and a broken wrist, a former Afghan colleague of Ghani’s told TheBlaze.

It was one of the first times Afghan colleagues got a taste of Ghani’s now well-known hot temper.

Former Afghan Official: John Kerry Has Prepared the Ground for Absolving the Obama Administration on Afghanistan

Afghan presidential candidate and former Finance Minister Ashraf Ghani Ahmadzai speaks during an interview with The Associated Press at his residence in Kabul, Afghanistan, July 14, 2014. (AP Photo/Massoud Hossaini)

Abdullah started raising questions about money that had been spent by Ghani when he was head of the Afghan Coordination Authority from early 2002 to the summer of 2002. Ghani was angry with Abdullah, who was questioning his integrity and they verbally fought. Abdullah, who had to leave the meeting early to catch a flight at the Kabul airport, directed a senior staff member with the Foreign Affairs ministry to sit in his place and continue the questioning.

Ghani, a former World Bank economist, became so angry at the questioning that he slammed his hand onto the desk and broke his wrist.

“There are two key fundamental issues between Ghani and Abdullah,” the senior Afghan official said.”One is that Abdullah believes in a more strong distribution of power and a parliamentary system. Ghani believes in a presidency with centralized power. Abdullah is a hawk on the Taliban and doesn’t believe in negotiating with them, whereas Ghani believes in reconciling with the Taliban. These are fundamental issues. Complicating matters is that both teams have members who are very polarizing.”

Abdullah’s camp is also apprehensive of the role the United States has in the election. Many fear the U.S. is pushing the negotiations in favor of Ghani, regardless of allegations that his camp tampered with the election ballots in the run-off.

In an interview with Asharq Al Awsat, a Pan-Arab daily newspaper, Ghani told a reporter, “we are not ready for a parliamentary system yet, because we don’t have major political parties.”

A State Department cable from April 2003, released by WikiLeaks in 2011,  backs those claims made by Afghan officials  that the U.S. supported Karzai because he agreed to a centralized presidency, not a parliament or a monarchy.

“[U.S.] Ambassador [Robert P. Finn] met with [French constitutional scholar, Guy] Carcassone April 8, at a lunch for the EU Ambassador hosted by the French Ambassador,” the WikiLeaks cable states. “Carcassone confirmed his view that the King should serve as constitutional monarch and said the Afghans were pushing for a Prime Minister. Ambassador said both were bad ideas and Afghanistan needed a strong President given all the vectors of power. Carcassone said the U.S. system worked only because of compromises and a prime ministerial system would be better for Afghanistan. Ambassador demurred, saying it would only lead to endless crises of power.”

Many senior U.S. officials believed then, as they do now, that it would be easier to “deal with one man. A parliament — even a monarchy — was a problem because both would be too difficult to control,” said a U.S. official with knowledge of the crisis.

“But just take a look at how Karzai has changed over the years,” the official said. “He refuses to sign a bilateral [security] agreement with the United States and has made disparaging statements about America’s role in the region when it benefits him. So dealing with one man can be just as difficult, especially when all the power is concentrated in one place.”

Follow Sara A. Carter (@SaraCarterDC) on Twitter