Jessica Durando

USA TODAY

Army Sgt. Bowe Bergdahl's defense attorneys will argue Tuesday that public comments by Sen. John McCain improperly tainted the court-martial case against the former prisoner of war.

The lawyers, at the hearing in Fort Bragg, N.C., are asking that the charges against Bergdahl be dropped or that he receive no punishment if convicted.

Bergdahl, of Hailey, Idaho, 30, faces a possible life sentence on charges of desertion and endangerment of U.S. troops after he walked off his post in Afghanistan in 2009 and was captured by the Taliban until 2014.

Maj. Justin Oshana, an Army prosecutor, said at the hearing that no other court has ever made a ruling similar to what the defense is asking. The judge, Army Col. Jeffery Nance, responded that he wasn’t sure he wanted to be the first either, but will consider the motion and rule later.

The defense motion stems from September 2015, when an officer who oversaw a preliminary hearing recommended the case be heard by a misdemeanor-level tribunal and said imprisonment wasn’t warranted.

A month later, McCain, chairman of the Senate Armed Services Committee, told a reporter the panel would hold a hearing if Bergdahl was not punished, according to the Associated Press.

"I am not prejudging, OK, but it is well known that in the searches for Bergdahl, after — we know now — he deserted, there are allegations that some American soldiers were killed or wounded, or at the very least put their lives in danger, searching for what is clearly a deserter," McCain, R-Ariz., said at the time.

In December, Gen. Robert Abrams sent Bergdahl's case to a court-martial and rejected the hearing officer's recommendation, the AP said.

Legal experts said it will be hard to convince a judge to throw out the charges. But Army officers may have acknowledged McCain's comments as a "threat to their careers," the AP reported. A spokesman for McCain didn't respond to a message for comment Tuesday morning by the AP.

The Obama administration won Bergdahl's release in 2014 in exchange for five Guantanamo Bay detainees.

McCain also expressed reservations about the exchange at the time.

The Guantanamo detainees "are hardened terrorists who have the blood of Americans and countless Afghans on their hands," McCain said. "I am eager to learn what precise steps are being taken to ensure that these vicious and violent Taliban extremists never return to the fight against the United States and our partners."

Contributing: Oren Dorell