WASHINGTON -- As soon as President Barack Obama told the nation Saturday evening that America's only prisoner of war in Afghanistan had been rescued, Republican lawmakers and pundits began criticizing the administration on how it handled the release of Sgt. Bowe Bergdahl.

Many lawmakers have been upset that Obama did not give Congress 30 days notice, as required by law. Others are upset that five Taliban detainees who were being held at Guantanamo Bay were released in return, with some conservatives even accusing the administration of negotiating with terrorists. (The government of Qatar actually negotiated the deal.) There are also now questions about Bergdahl himself, and whether he initially deserted his post.

"With 29 percent of former Guantanamo detainees having reengaged or being suspected of reengaging in terrorism, the administration's decision to release these five terrorist detainees endangers U.S. national security interests," said Sen. Kelly Ayotte (R-N.H.). "It also sets a precedent that could encourage our enemies to capture more Americans in order to gain concessions from our government."

But prior to Bergdahl's release, Republican lawmakers were some of the sergeant's biggest advocates, and repeatedly pressed the administration to do something -- in fact, everything within its power -- to get him returned to the United States.

A May 22 press release from Ayotte's office read, "As part of ongoing efforts to urge the Department of Defense to do all it can to find Sergeant Bowe Bergdahl and bring him home safely, Senator Ayotte worked successfully to include a provision in the bill that presses Pakistan to fully cooperate in the search for SGT Bergdahl."

When asked for comment on why she is now criticizing Obama's handling of the prisoner swap, Ayotte's office pointed to her longstanding views on Guantanamo, arguing that her position is not inconsistent. Her office said the senator backs a policy that includes permanent limits on the transfer of detainees from Guantanamo to foreign countries.

"Senator Ayotte has led efforts in Congress to prevent the release of high risk detainees from Guantanamo, and she never would have supported trading five dangerous terrorists who are likely to reengage in terrorist activities against Americans and our allies," Ayotte spokesman Jeff Grappone wrote in an email.

"We have a responsibility to ensure no service member is left behind, which is why Senator Ayotte pushed DoD to find Bergdahl and to determine whether he could be safely rescued and returned home," he added.

Some lawmakers who have spoken critically in recent days of the Bergdahl deal had appeared, not too long ago, to have endorsed the concept of a prisoner swap, in which he could be exchanged for Taliban detainees at Guantanamo Bay.

Take Sen. John McCain (R-Ariz). On Feb. 18, 2014, he told CNN's Anderson Cooper that he could support such an arrangement, albeit reserving judgment for some of the details:

COOPER: Would you oppose the idea of some form of negotiations or prisoner exchange? I know back in 2012 you called the idea of even negotiating with the Taliban bizarre, highly questionable. McCAIN: Well, at that time the proposal was that they would release -- Taliban, some of them really hard-core, particularly five really hard-core Taliban leaders, as a confidence-building measure. Now this idea is for an exchange of prisoners for our American fighting man. I would be inclined to support such a thing depending on a lot of the details. [...] COOPER: So if there was some -- the possibility of some sort of exchange, that's something you would support? McCAIN: I would support. Obviously I'd have to know the details, but I would support ways of bringing him home, and if exchange was one of them, I think that would be something I think we should seriously consider.

(Watch video of the exchange here.)

The day after Bergdahl's release was secured, however, McCain was on the Sunday morning talk shows questioning why the administration would release the "hardest of the hard core." On Monday, the following day, he stressed that he "would not have made this deal."

"I would have done everything in my power to repatriate him and I would have done everything I possibly could. But I would not have put the lives of American servicemen at risk in the future," he said.

McCain spokesman Brian Rogers said the senator's objections lie in the details.

"The details that we know so far are troubling and could enable these hard-core Taliban leaders to return to the battlefield against Americans and our allies and partners next year," he said.

On Tuesday, his office issued a statement, saying the senator had "serious concerns" about a report that the five detainees being transferred to Qatar would be "able to travel freely in the country and, after one year, will be able to leave Qatar, including travel to Afghanistan."

Another outspoken champion for Bergdahl's release was Rep. Rich Nugent (R-Fla.), who wanted the administration to "do everything possible" for his safe return.

"Last year, on the fourth anniversary of Sgt. Bergdahl's capture, on the floor of the House of Representatives, I introduced a resolution in the House calling on the United States to do everything possible not to leave any members of the armed forces behind during the drawdown of Iraq and Afghanistan. Believe it or not, I had members of Congress come up to me and say, 'I didn't know we had a living POW in Afghanistan.' That was shocking to me," said Nugent, according to a Feb. 24 article in the Citrus County Chronicle.

In a statement to The Huffington Post, Nugent said that for the sake of Bergdahl's family, he was "very glad that our only living POW is back home." He added, however, that he disagreed with how the administration handled the release.

"But what angers me so much about this situation is that knowing full well that there was strong opposition to a prisoner swap in Congress, the Administration decided to go behind our backs and release the detainees without the notification required by law," he said. "As a member of the Armed Services Committee, I look forward to getting answers from the Administration soon about how they intend to ensure that these senior Taliban detainees do not return to the battlefield. Now mind you I am still getting all of my information from press accounts three days later, but apparently the detainees are completely free to move about Qatar however they please and will be free to travel after one year. So while I appreciate the President's assurances to the press that these individuals won't pose a threat to civilians or our troops, you can understand why many of us have been and continue to be skeptical."

In April, Sens. Pat Toomey (R-Pa.) and Bob Casey (D-Pa.), along with Senate Minority Leader Mitch McConnell (R-Ky.), introduced a resolution "to express the sense of the Senate that no member of the armed forces who is missing in action or captured should be left behind."

Toomey has not yet put out a statement. McConnell spokesman Don Stewart said the minority leader was pleased that Bergdahl is safe but still has questions about the administration's handling of the situation, including the lack of mandated notification and concerns that the Taliban detainees may return to the battlefield.

Sen. James Risch (R), who represents Bergdahl's home state of Idaho, declined to criticize the Obama administration during an interview with the Idaho Statesman, saying it was not the right time for such comments.

"There will be time to delve into those matters," he said.

He also said that members of the Intelligence Committee, on which he serves, were constantly updated on Bergdahl's whereabouts.

"There wasn't a week that went by that we didn't get a briefing," he added.

John Bellinger, who served as a national security adviser to President George W. Bush, said in a Fox News interview Tuesday that he believed Obama did the right thing in its recovery of Bergdahl. He noted that because the war in Afghanistan is winding down -- U.S. troops will be out by the end of 2016 -- the administration would have had to release the five detainees soon anyway.

"Sometime in the next couple of years, whether it's in the beginning of 2015 or shortly thereafter, this conflict in Afghanistan is winding down, and we would be required, at least under the traditional laws of war, to return people that we've detained in that conflict," he said. "So it seems in this case, we've gotten -- we traded them for reasonable deal here."

Joint Chief of Staff Chairman Martin Dempsey also defended Bergdahl's recovery on Facebook Tuesday, writing that it was "likely the last, best opportunity to free him."

UPDATE: 6/4 -- ThinkProgress notes that Sen. James Inhofe (R-Okla.), another lawmaker who has criticized Obama for freeing "people who have killed Americans," was also among those pressing the administration to do more to rescue Bergdahl. Last year, Inhofe said of Bergdahl, "The mission to bring our missing soldiers home is one that will never end. It's important that we make every effort to bring this captured soldier home to his family."

Andrew Perez contributed reporting.