Within months of Army Sgt. Bowe Bergdahl’s capture in Afghanistan, the Obama administration began considering plans for a rescue.

Bergdahl slipped away from his post in Afghanistan’s Paktika province in June 2009 and fell into Taliban hands. He was then moved across the border into the tribal areas of Pakistan, where he was held by the Haqqani network, a ­U.S.-designated foreign terrorist organization with connections to Pakistan’s intelligence service.

The circumstances of Bergdahl’s captivity forced the administration to decide whether it would be willing to share more intelligence with Pakistan’s government, despite concerns about its loyalties, or deploy troops to try to grab Bergdahl. On each count, the answer from many inside the administration was no.

“There were negotiating paths we could have explored other than the Taliban in Doha,” said David Sedney, who until last year served as the Pentagon’s top official overseeing policy in Afghanistan and Pakistan. “Specifically, putting more pressure on the Pakistanis to get him or get us more intelligence. I am not aware of them actually helping us, despite repeated requests.

“It could have made the possibility of rescuing him more likely,” Sedney said.

The long arc of Bergdahl’s deployment and captivity is being scrutinized in light of the rising, mostly partisan debate over whether President Obama gave up too much to the Taliban for the 28-year-old soldier’s release.

With Bergdahl’s mother and father by his side, Obama celebrated the soldier’s return Saturday as a late milestone in the United States’ longest war and a necessary step in helping conclude America’s post-9/11 era.

But an increasing number of Republicans said Tuesday that they would not have freed five Taliban commanders from the military prison at Guantanamo Bay, Cuba, in exchange for one soldier.

“I think we should have made efforts to bring Bergdahl home, but this price is higher than any in history,” said Sen. John McCain (Ariz.), who as a Navy pilot was held captive in North Vietnam for six months longer than Bergdahl’s time with the Taliban.

Other congressional leaders, including some Democrats, criticized the administration for not notifying Congress of the exchange in the time frame outlined by law.

Obama, traveling in Poland on Tuesday, offered a forceful defense of his decision.

“We saw an opportunity, and we were concerned about Bergdahl’s health,” he said, adding that assurances from the government of Qatar, the Persian Gulf emirate where the released Taliban commanders will remain for at least a year, helped solidify the deal.

“Is there the possibility of some of them trying to return to activities that are detrimental to us? Absolutely,” Obama said. “There’s a certain recidivism rate that takes place.”

The debate has been shaped by simmering frustration within military ranks. Some have found fault with national security adviser Susan Rice’s comments on a Sunday news show, when she said Bergdahl had served “with distinction and honor,” despite questions about the circumstances around his capture.

U.S. military officials signaled Tuesday that they will investigate those circumstances along with allegations that Bergdahl, possibly disenchanted with the war effort, willingly abandoned his post.

Criticism from Congress

On the Hill, Democrats were more vocal than in previous days in expressing their concern that the White House did not notify Congress of the Guantanamo detainee release ahead of time.

The National Defense Authorization Act of 2014 requires the administration to notify Congress at least 30 days before releasing a prisoner from Guantanamo. But Obama, in what is known as a signing statement, forecast that he may disregard the rule because he believed that it unlawfully restrained his presidential authority.

Sen. Dianne Feinstein (D-Calif.), who heads the Senate Intelligence Committee, said that deputy national security adviser Antony J. Blinken called her Monday night to apologize for failing to notify her of the release before it was disclosed publicly.

A senior administration official, who spoke on the condition of anonymity to discuss the phone call, said Blinken told Feinstein “that we regretted we were not able to reach some members personally on Saturday.”

“We have been very clear about the reasons we did not notify the Congress 30 days in advance,” the official said.

Indirect talks between the United States and the Taliban, a U.S.-designated foreign terrorist organization, in pursuit of a broad political reconciliation began in early 2011. That same year, according to House Republican aides, the White House first mentioned the possibility of a prisoner exchange for Bergdahl’s release.

Soon afterward, House Republicans sent two letters to the Obama administration seeking more information on the possibility of an exchange, the aides said, and another briefing with the administration followed on Jan. 31, 2012.

GOP aides said the next time congressional Republicans spoke with the administration about the issue was Saturday, when a Pentagon official called an adviser to House Speaker John A. Boehner (Ohio) with word of Bergdahl’s release.

“I haven’t had a conversation with the White House on this issue in a year and a half,” Sen. Saxby Chambliss (Ga.), the ranking Republican on the Intelligence Committee, said Tuesday. “If that’s keeping us in the loop, then this administration is more arrogant than I thought they were.”

A complicated debate

Inside the administration, the calculations over Bergdahl’s fate were complicated by seemingly unrelated events, including the raid on Osama bin Laden’s compound in May 2011, when U.S. forces traveled deep into Pakistan and killed the al-Qaeda leader. The operation infuriated Pakistan’s government and raised fears among U.S. officials that their uncertain ally’s already mixed support for the war effort would wane further.

Around that time, U.S. officials began to contemplate an operation to rescue Bergdahl, according to a former senior administration official who participated in the discussions.

At least twice before Bergdahl’s release, U.S. officials had a possible fix on where he was being held, but some administration officials familiar with the intelligence said there were gaps that left his circumstances unclear. And there were strong voices opposed to an operation, led by then-national security adviser Thomas Donilon and his deputy, Denis McDonough, who is now White House chief of staff.

Their concern, the official said, was further angering Pakistan’s government and spy agency, which has close connections to the Haqqani network.

Those who supported a rescue operation included Adm. Mike Mullen, then chairman of the Joint Chiefs of Staff, and then-CIA Director Leon E. Panetta. Their argument in favor of a high-risk, lower-reward operation than the bin Laden raid eventually failed.

During the same debate, officials were considering the emerging prisoner-exchange proposal. White House advisers believed that a successful exchange would not only free Bergdahl but would also encourage moderate Taliban members to take an Afghan-led reconciliation process seriously.

But Panetta and other officials — including Defense Secretary Robert M. Gates, Secretary of State Hillary Rodham Clinton and Director of National Intelligence James R. Clapper Jr. — opposed the terms of the proposed prisoner exchange, according to the official.

Clinton replied in writing to the written concerns of lawmakers in between the various meetings, according to House aides. The contents of her responses were deemed classified and were not available for review by reporters, the aides said Tuesday. Clinton, now considering a run for president in 2016, on Tuesday publicly endorsed the deal to free Bergdahl that the official said she once privately opposed.

A spokesman for Clapper said that he, like others, had expressed concern about the proposal but added that “circumstances have changed dramatically,” citing concerns about Bergdahl’s declining health, the drawdown of U.S. troops and cooperation from Qatar in monitoring the detainees after their release.

Another former Obama administration official, who spoke on the condition of anonymity to discuss the secret process, said Gen. Martin Dempsey, who took over from Mullen as chairman of the Joint Chiefs of Staff, began a renewed effort to free Bergdahl about a year ago.

Dempsey, concerned that time was running out to make a deal for Bergdahl before the U.S. combat mission concluded at the end of this year, was searching for new ideas.

“They were looking at what are the options that are currently available to get this kid home one way or the other,” said a U.S. counterterrorism adviser, who spoke on the condition of anonymity to describe the search.

“He wanted all the theoretical options on the table. Dempsey knew there was a short window. Obama was looking for a way out of Afghanistan,” the adviser added. “Those things were communicated. It has a cascade effect.”

Karen DeYoung in Brussels; Zachary A. Goldfarb in Warsaw; and Ed O’Keefe, Greg Miller and Ellen Nakashima in Washington contributed to this report.