WASHINGTON (AP) -- Right up until the moment Army Sgt. Bowe Bergdahl was freed, U.S. officials weren't sure the Taliban would really release the only American soldier held captive in Afghanistan in exchange for high-level militants detained at Guantanamo Bay.
It was touch and go. But then came the call at 5:12 p.m. Saturday on a secure phone line at the U.S. Embassy in Doha, Qatar. U.S. negotiators learned that Bergdahl, a 28-year-old from Hailey, Idaho, held by the Taliban for nearly five years, was aboard a Delta Force helicopter bound for a U.S. base north of Kabul.
Bergdahl's release has hardly been a straightforward yellow-ribbon moment for the U.S. Bergdahl apparently was disillusioned with the war and left his post. He was found unarmed, wandering in Paktika province in Afghanistan, when the Taliban detained him in 2009, provincial police chief Nabi Jan Mhullhakhil said Monday. The decision to free him in exchange for five top Taliban officials who have been held in the U.S. detention center in Cuba has raised questions about whether such a swap was too big a concession to make.
According to a State Department official directly involved in the negotiations in Doha, U.S. officials who had holed up in the embassy for three straight days thought the final days of negotiations with the Taliban's political leadership, through Qatari intermediaries, had gone pretty smoothly.
The U.S. had gotten the Taliban to agree that the five detainees would be prohibited from traveling outside Qatar for a year after their release -- something the Taliban earlier had opposed.
In return, the U.S. agreed to release all five detainees at once, not one or two at a time as previously offered, in an effort to get Bergdahl back more quickly.
Still, the negotiators weren't positive the deal would work until they got the call that U.S. forces had the Army sergeant, who broke down and cried during the flight. After the call, the negotiators were emotional, too, he said.
"Backslapping was not how I would describe it," he said. "It wasn't like New Year's Eve. It was emotional, but not a giddy moment."
It's still unclear what the exact breakthrough moment was, but over lengthy negotiations the official said the talks gelled. Both sides wanted it to happen immediately before it could fall apart.
Details of the secret negotiations were described by the State Department official. But other information on the state of diplomacy between the Taliban, the U.S. and others was described by other current and former U.S. officials. None were authorized to speak about the deal publicly and spoke only on condition of anonymity. The negotiating team included two each from the State Department and the Pentagon, one from the White House national security staff and two from the U.S. Embassy in Doha.
Some Republicans in the U.S. said the deal for Bergdahl's release could set a troubling precedent. Others said the Obama administration gave up too much before exhausting other avenues that were being pursued to secure the soldier's release.
"Knowing that various lines of effort were presented and still under consideration, none of which involved a disproportionate prisoner exchange, I am concerned by the sudden urgency behind the prisoner swap, given other lines of effort," said Rep. Duncan Hunter, R-Calif., who has criticized the government effort to seek Bergdahl's release as disorganized.
Some Democrats aren't happy either. Senate Intelligence Committee Chairwoman Dianne Feinstein of California said Congress should have gotten advanced warning as a law on releasing Guantanamo detainees requires. She said her committee would have a closed briefing today on the prisoner swap.
The prisoner swap idea had evolved in fits and starts since early 2011. The idea of an exchange was one of three confidence-building measures that were meant to open the door for the Afghan government to hold direct peace negotiations with the Taliban.
The State Department official, who spent the past 11 days in Doha helping guide the final round of negotiations to release Bergdahl, said that after the office-opening incident, the U.S. made it clear that it was amenable to indirect or direct talks with the Taliban.
In September 2013, the Taliban made an offer that appeared to be a request for direct talks about the Taliban detainees at Guantanamo Bay. The U.S. responded by seeking proof that Bergdahl was still alive. The Taliban released a video of Bergdahl in January.
A month later, however, the Taliban said they had suspended talks with the U.S. to exchange Bergdahl for the five Taliban officials. U.S. officials viewed it as a relatively mild rebuff and went to the Qataris to find out whether there still was the possibility of talks about the detainees. The Qataris agreed to act as an intermediary and after some consideration, the Taliban decided they were willing to talk.
No substantive discussion about terms of the swap occurred before both sides agreed to the latest talks, which started in late March or early April. U.S. officials were never in the same room with the Taliban leaders.
U.S. officials would talk to the Qataris, who would then contact the Taliban. Sometimes a couple of weeks would pass before U.S. officials would get a response from the Taliban on various issues involving the swap. In the few days leading up to Saturday's release, the communication became more frequent and the turnaround time was only a day.
U.S. officials did their negotiating in various Qatari government buildings -- once changing venues because of broken air conditioning.
The State Department official said there was not a single breakthrough that allowed the swap to materialize, although U.S. officials believed that the Taliban's decision to accept the one-year travel ban for the released detainees was a large step forward. In earlier rounds of negotiations, the Taliban had always sought exemptions from the travel ban for medical purposes or other reasons.
The official said the detainees' activities will be limited in Qatar, an Arab emirate on the Persian Gulf, but that the conditions are not like house arrest. The five detainees, who are all in their 40s, received physicals upon arriving in Qatar on Sunday.
By last Wednesday morning, the U.S. negotiators had finalized the broad terms of the agreement. Then it was down to risky logistics of actually transferring Bergdahl in a war zone where both sides, who are fighting each other, had to be present.
Even on Saturday, up until the moment Bergdahl walked free, the U.S. negotiators were on the phone talking to the Taliban political leaders -- through the Qataris -- trying to prevent a misunderstanding from scuttling the deal.
Associated Press writers Ken Dilanian and Donna Cassata in Washington and Amir Shah in Kabul, Afghanistan, contributed to this report.