WASHINGTON (Reuters) - President Barack Obama set a dangerous precedent by swapping five Taliban prisoners for a captured U.S. soldier in Afghanistan and may have broken the law, members of Congress said on Monday as they pressed for public hearings on the issue.

U.S. Army Sergeant Bowe Berghdal is pictured in this undated handout photo provided by the U.S. Army and received by Reuters on May 31, 2014. REUTERS/U.S. Army/Handout via Reuters

Fueling criticism of the decision to swap Army Sergeant Bowe Bergdahl for five Taliban detainees being held at the Guantanamo Bay Naval Base in Cuba were accusations by some soldiers that the Idaho native was a deserter who cost the lives of several comrades.

The State Department said it considered Bergdahl “a member of the military who was detained while in combat.” The Pentagon said it was unable to confirm media reports that troops had been killed in operations trying to locate Bergdahl following his June 2009 disappearance.

“There have been several looks into the circumstances surrounding his disappearance, but we’ve never publicly said anything, primarily because we haven’t had a chance to speak with Sergeant Bergdahl himself,” said Army Colonel Steve Warren, a Pentagon spokesman.

The White House pushed back against Republican criticism that the administration may have broken the law by releasing the five Taliban leaders without giving Congress 30 days notice. Officials said lawmakers had been briefed for years on efforts to free Bergdahl, including a potential prisoner swap.

White House Chief of Staff Denis McDonough said the deal to secure Bergdahl’s release “should not have been a surprise” to lawmakers.

“We did not have 30 days to wait to get this done,” McDonough said at the Center for Strategic and International Studies think tank. “And when you’re commander-in-chief, you have to act when there’s an opportunity for action.”

Congressman Mike Rogers, Republican chairman of the House of Representatives Intelligence Committee, dismissed the White House’s portrayal of events leading to Bergdahl’s release as urgent and sensitive. In comments on CNN he called it “nonsense” and an “excuse to try to violate or certainly circumvent the law”.

Republican lawmakers on the Armed Services panels in both the Senate and House called for public hearings into the prisoner exchange. The Senate panel scheduled a closed session next week to hear testimony on the issue from senior defense officials.

“The question is ... by getting the return of Sgt. Bergdahl, are you placing in danger the lives of Americans in the future, and I believe you are,” Arizona Senator John McCain told reporters at the U.S. Capitol.

‘GET A SOLDIER HOME’

Senator Carl Levin, the Democratic chairman of the Armed Services Committee, said Defense Secretary Chuck Hagel had made the decision, not the president, and pointed to remarks by the military’s top uniformed officer, Army General Martin Dempsey, supporting the action.

“I’m not going to be critical of this decision because it’s an excruciatingly difficult decision,” Levin told reporters. He said while the 30-day notification to Congress is important, “it’s also important that we get a soldier home.”

But Republicans said they were concerned that the White House had broken the law and set a dangerous precedent for national security by negotiating the trade with the Taliban, in part to further Obama’s effort to close Guantanamo prison.

“These five would be perhaps the most dangerous terrorists that were there (at Guantanamo),” said Oklahoma Senator James Inhofe, the top Republican on the Senate Armed Services Committee. “I think the whole motive here is that the president wants to continue to try to shut that down. He knows he doesn’t have the support of Congress, and that’s part of the motivation.”

But other lawmakers said the main issue was Bergdahl’s release. Senator Jack Reed, a top Democrat on the Armed Services panel, said: “Ultimately, it’s about ensuring to everyone who wears the uniform that we will do everything we can to get them back home. I think that’s the most overriding issue in my mind.”

Senator James Risch, an Idaho Republican, said the people of his state were happy the soldier was coming home, and declined to discuss the prisoner swap or allegations he had deserted.

The Pentagon said Bergdahl was in stable condition at the U.S. Army’s Landstuhl Regional Medical Center in Germany, where doctors were assessing his condition after five years of captivity.

Bergdahl, 28, has not yet spoken to his family but will do so once he and psychologists believe the time is right, Warren said. He will return to the United States when doctors say he is ready.

A source close to Afghanistan President Hamid Karzai’s palace in Kabul said Karzai was angry at being kept in the dark and more distrustful of U.S. intentions.

But U.S. Ambassador to Afghanistan James Cunningham told reporters in Kabul the Karzai administration had been made aware of the impending prisoners’ swap.