Some Republicans believe the prisoner swap involving Sgt. Bowe Bergdahl is a move by the Obama administration to begin emptying the Guantanamo Bay detention camp he promised to close five years ago.

Sen. Lindsey Graham, R-S.C., who served as a lawyer in the Air Force for 31 years, said Obama was floating a "trial balloon," to determine if he could begin releasing the 149 remaining prisoners from the camp as part the official process of ending the war in Afghanistan.

“And that the reason we let these people go is that the war is over,” Graham told the Washington Examiner.

Sen. James Inhofe, R-Okla., the ranking member on the Senate Armed Services Committee, told several media outlets he believes Obama's motive for allowing the release of five Taliban leaders from the prison is aimed at hastening the closure of Guantanamo.

“This president has an obsession, has two obsessions I guess I should say, that he wants to turn into his legacy when he leaves office,” Inhofe told TheBlaze TV on Tuesday. “One of those happens to be to close Gitmo.”

President Obama has made numerous public pledges to close the prison, both before and after winning office. Most recently, he told West Point graduates he would continue to push to close the prison,“because American values and legal traditions do not permit the indefinite detention of people beyond our borders.”

He also called on Congress during his State of the Union speech in January to stop blocking funding for the removal of prisoners, who could then be transferred to other prisons in the United States.

“Because we counter terrorism not just through intelligence and military action, but by remaining true to our Constitutional ideals, and setting an example for the rest of the world,” Obama said.

House GOP aides Tuesday revealed that Obama administration officials first told Congress they wanted to release the five Taliban members from Guantanamo Bay as an end-of-war gesture during a private briefing on Nov. 30, 2011.

At the time, officials said they wanted to let the men go because they believed it would help provide the best path forward to getting the U.S. military out of Afghanistan.

The prisoner exchange, they said, would serve as a confidence building measure.

But Graham told the Examiner he believes the detainees are not prisoners of war who should be released when the United States leaves Afghanistan.

“If they are trying to establish a legal theory that this is an end-of-war move, where they give back their prisoners and we give back ours, then that is an invalid construct,” Graham said. “They are unlawful enemy combatants and under the law they can be held as long as they are a threat.”

Sen. John McCain, R-Ariz., said he doesn't know if Obama is planning to empty the prison, which has been highly criticized on the international stage and has been the scene of hunger strikes and reports of prisoner mistreatment since opening in 2002.

“I don’t know if that is their motive or not,” McCain said when asked about closing the detention camp. “I know these prisoners were judged as too great a risk to be released, so the plan has always been to find a facility in the United States where those people who were too great a risk would be moved to.”

Congress has repeatedly blocked funding to close the camp or move its prisoners to the United States.

Senate Armed Services Committee Chairman Carl Levin, D-Mich,, one of the few Democrats to defend the prisoner swap, laughed at Inhofe's theory on closing the prison.

“I don’t think that is part of the strategy,” Levin told the Examiner. “I think he was trying to get an American soldier home.”

Lawmakers will receive classified briefings on the exchange next week.

In the House, the Republican majority is planning to hold oversight hearings on the matter.