Afghan National Army (ANA) cadets hold a graduation ceremony on the outskirts of Mazar-i-Sharif. (QAIS USYAN/AFP/GETTY IMAGES)

The Obama administration, as part of an accelerated push toward anendgame in Afghanistan, last month reached a tentative accord with Taliban negotiators that would have included the transfer of five Afghans from U.S. detention at Guantanamo Bay, Cuba, and the Taliban’s public renunciation of international terrorism.

The deal called for the prisoners to be sent to house arrest in Qatar, where the Taliban planned to open an office, and additional actions by both sides, according to U.S. and European officials who would discuss the sensitive negotiations only on the condition of anonymity. Until now, no Guantanamo detainees have left the prison as bargaining chips in a larger deal.

It was the closest that the parties have come to genuine peace negotiations after nearly a year of talks, officials said. They said the agreement ultimately collapsed after Afghan President Hamid Karzai balked at its terms.

“Right now, things have stopped,” said a senior Obama administration official. “Everybody is taking a deep breath.” Contacts with the Taliban are expected to be reestablished early in the new year.

The negotiations reflect a marked change over the past year in what the administration believes is both acceptable and achievable in Afghanistan, apart from the core objective of eliminating al-Qaeda and the possibility that it could reestablish an Afghan presence.

Disappointment in the governments of both Afghanistan and Pakistan, economic and political pressures at home, and sheer fatigue with the decade-long effort have led to lowered expectations as the United States and its allies head toward the scheduled withdrawal of all foreign troops by the end of 2014.

The need to fashion a comprehensive, realistic exit strategy was also underlined in a newly completed National Intelligence Estimate on Afghanistan, a classified assessment produced by U.S. intelligence agencies. Officials familiar with the document described it as uniformly pessimistic about the future.

“We’re not looking for nirvana,” said a second administration official. “We’re pretty sanguine about Afghan ‘good enough.’ That’s the framework” for current strategy discussions, this official said. “That’s why we’re working so hard on reconciliation.”

U.S. commanders have said that the Taliban’s interest in talks stems from coalition gains on the battlefield. But officials said they believe the insurgents are more or less in the same position as the United States in forecasting that the conflict will reach an inconclusive end. Taliban leaders may believe that political accommodation now will better position them for future struggles after the troop withdrawal, officials said.

Short-term agreements with the insurgents, such as the establishment of cease-fire zones, could influence decisions on when to transfer areas to Afghan control. Those transitions could, in turn, dictate the pace of troop withdrawal, as well as longer-term assessments of what “good enough” means in terms of stability and central government control.

Negotiations with Karzai over an ongoing U.S. troop presence beyond 2014 — the Pentagon’s working number is somewhere between 10,000 and 30,000 — will be influenced by whether other countries in the region perceive that presence as contributing to or undermining their own security goals.

President Obama has already ordered the withdrawal by September of the 33,000 troops he sent to Afghanistan last year. “The big debate,” a Defense official said, is “can you come up with another number for what happens over the next 12 months” after that drawdown. “The argument will once again be the military saying let’s keep it at 68,000,” the number of troops who will remain in September, “and [Vice President] Biden saying let’s get it down to 20,000 really quickly, with the reality somewhere in between.”

Although Biden lost the argument over the surge in late 2009, officials said the internal administration balance has shifted toward a steeper glide path that would put the Afghans in charge sooner rather than later, in conjunction with a political settlement.

Gen. John R. Allen, the commander of U.S. and NATO forces in Afghanistan, said last week that the pace of withdrawal after September will not be resolved until his staff completes a “strategy-based discussion” now underway and receives specific orders from Obama.

But Allen indicated that a change of mission has already been decided, with U.S. troops shifting gradually from broad counterinsurgency operations and “shoulder-to-shoulder” partnership with Afghan troops to an advisory role. “That will in many respects be a preview of how we’ll see our forces postured in the years to come,” he said.

The administration hopes to have all elements of the strategy working together by May, when NATO leaders meet at a Chicago summit to flesh out plans for achieving the 2014 withdrawal deadline.

“Not all of it will be done” in time for the Chicago meeting, the senior official said. “But we would like to be ready to make an intelligent presentation.”

For now, the administration official said, “we see reconciliation as the most important pillar of our effort. It’s one that’s intertwined with everything else we’re doing, especially the military elements.”

The potential transfer of prisoners was the result of at least a half dozen meetings this year between U.S. representatives and a Taliban delegation headed by Tayyib Agha, an aide to Afghan Taliban leader Mohammad Omar. German officials have held other meetings with other Taliban representatives.

“We believe we are talking to the right people, those who have the ability to do confidence-building measures,” the senior administration official said.

“We knew what we wanted — a statement against international terrorism” that would amount to a public break with al-Qaeda, the official continued, as well as a similar statement of support for Afghanistan’s constitutional democracy, “and an agreement to start negotiations with the Afghan government.”

“They want five prisoners from Guantanamo,” among about 20 Afghans being held there, the official said. “They would like an office [in Qatar]. We said okay, but only for the purpose of negotiating with the Afghans. Not for propaganda, not for recruitment, not for an alternative government, but about the future of Afghanistan.”

As discussions progressed rapidly through the fall, officials grew optimistic that a deal could be announced at an international conference on Afghanistan held in Bonn, Germany, on Dec. 5. Aspects of the transaction, including the transfer of Guantanamo prisoners, were first reported by Reuters on Monday.

Agreement initially bogged down as U.S. lawyers expressed concern over the details, including restrictions Congress has placed on the transfer of any prisoners from Guantanamo — let alone Taliban members. The United States refused to release the detainees and neither side was happy about transferring them to an Afghan prison. Qatar, which had already agreed to host a Taliban office, said it would supervise them under house arrest.

But Karzai refused at the last minute to sign on to the deal.

“During the process, different players play the difficult part at different times,” a European official said. “At the moment, it’s him.”

Although officials said that Karzai has been “fully briefed” throughout the process, his attitude toward negotiations has been mercurial. Officials said he had failed to build political support at home among powerful Afghan players, particularly ethnic Tajiks and other forces in the northern part of the country, whose opposition to peace talks was fueled when an insurgent suicide bomber killed chief Afghan peace negotiator Burhanuddin Rabbani in September.

Since the tentative agreement died, new roadblocks have appeared. Last week, Afghanistan withdrew its ambassador from Qatar because, an Afghan official said, the Qataris had not kept Kabul fully informed of their actions. A statement issued by Karzai’s office said that no Taliban office should be opened until the insurgents stop their “fighting and violence against the people of Afghanistan” and that any such facility should be in Afghanistan, Saudi Arabia or Turkey, not Qatar.

After congressional leaders were briefed after the fact on the possibility that such a deal might come to pass in the future, one lawmaker, Sen. Saxby Chambliss (R-Ga.) publicly denounced any negotiations with the Taliban. Political pressure against such talks is likely to increase as the U.S. presidential election draws near.

“What you need in a peace process, and surely in this one, is the simultaneous readiness of all major actors . . . to risk the absoluteness of their position,” the European official said. “You need courage to do this. The problem is that sometimes you have it on one side, but the other side is not ready.”

Staff writer Craig Whitlock contributed to this report.