The notion that the United States does not negotiate with terrorists is a long-held principle.
The enthusiasm over the release of kidnapped Army Sgt. Bowe Bergdahl angered some people because Bergdahl's freedom involved the conditional release of five Taliban leaders from Guantanamo Bay.
Republican leaders in the House and Senate took turns hammering President Obama on Sunday for violating the law by not informing Congress of the deal beforehand. They claimed the move weakened America's stance in the world and put U.S. troops at risk by showing terrorist organizations they can win concessions by kidnapping Americans.
"I fear that the administration's decision to negotiate with the Taliban for Sgt. Bergdahl's release could encourage future terrorist kidnappings of Americans," Sen. Marco Rubio, R-Fla., said Sunday in a statement.
But security experts like Bruce Hoffman, director of Georgetown University's Center for Security Studies, said that however common the refrain "we do not negotiate with terrorists" has become, it is "repeated as mantra more than fact."
"We have long negotiated with terrorists. Virtually every other country in the world has negotiated with terrorists despite pledges never to," Hoffman said. "We should be tough on terrorists, but not on our fellow countrymen who are their captives, which means having to make a deal with the devil when there is no alternative."
Hoffman lists a series of high-profile instances when U.S. presidents have negotiated with terrorists. There was the Iran hostage crisis that started in the 1970s and eventually led to the release of 52 Americans. Or the Iran-Contra affair of the mid-1980s when the U.S. government sold arms to Iran partly to win the release of U.S. hostages in Lebanon.
Charles "Cully" Stimson, a security expert at the conservative Heritage Foundation think tank, said there are even more examples of small-scale negotiations with terrorist groups that the public, and many members of Congress, just don't know about.
Under President George W. Bush, Stimson helped coordinate the Pentagon's detainee operations in Iraq, Afghanistan, Guantanamo Bay, Cuba, and other places around the world. He said presidential administrations of both political parties routinely have been forced to deal with terrorist groups for "information, supplies, personnel — a lot of different topics."
"We have had very quiet negotiations, or discussions at least, with terrorist groups over the years on a whole host of things," Stimson said. "They just haven't usually come to light."
"This is a legitimate prisoner swap," said Peter Mansoor, a retired Army colonel and professor of military history at Ohio State University.
He pointed out that the Taliban was ruling Afghanistan when U.S. forces went in to topple the government after Sept. 11, 2001. "I would have much more heartburn if these were al-Qaeda leaders" that were released, Mansoor said.
Michael O'Hanlon, an analyst at the Brookings Institution, said it has been U.S. policy to seek this type of deal for a couple years.
"I always saw the downside but don't recall the pitched debate about is until now," he said in an e-mail. "In a broader sense, even though the war is undeclared, this is a prisoner swap among belligerents more than a release of a hostage held by terrorists."
There will be plenty of discussions about the legality and the wisdom of Obama's decision in the coming weeks.
Stimson said there are valid questions to ask, such as the conditions the Taliban leaders will face in Qatar, the country that agreed to take and monitor them to ensure they don't engage in actions that threaten the United States. With the war in Afghanistan winding down, the U.S. may have to release all prisoners being held in Guantanamo Bay, which would have eliminated any chance of trading for Bergdahl's release.
Facing a deadline like that, Stimson said, any president — Republican or Democrat — could have made the same decision.
"Anyone who says otherwise ... hasn't been involved in these kinds of negotiations," he said.