WASHINGTON — The attorney for Army Sgt. Bowe Bergdahl lashed out on Tuesday at Republican presidential candidate Donald Trump and congressional committees for peddling misinformation that he says is impeding his client’s right to a fair trial.

A court-martial is the next step in the military’s case against Bergdahl, who was held captive by the Taliban for five years and freed in a controversial exchange for five Taliban detainees held in Guantanamo Bay.

Bergdahl, 29, of Hailey, Idaho, walked off his post in eastern Afghanistan’s Paktika province on June 30, 2009. He was released in late May 2014 as part of a prisoner swap that touched off a firestorm of criticism, with some in Congress accusing President Barack Obama of jeopardizing the safety of a nation with the exchange.

Bergdahl’s disappearance and the possibility that he might face light punishment had angered many in the military, given that his fellow soldiers took considerable risks to search for him.

Bergdahl’s attorney, Eugene Fidell, asked that Trump “cease his prejudicial months-long campaign of defamation against our client.” In October, Trump called Bergdahl a “traitor, a no-good traitor, who should have been executed.”

Fidell told The Associated Press in an interview that Trump stated more recently in Las Vegas, Nevada, that five soldiers were killed trying to find Bergdahl. The Pentagon has said no one died in the searches.

Trump also has pledged to review the case if Bergdahl is not appropriately punished, Fidell said.

“I have no idea what Mr. Trump has in mind and I don’t think Mr. Trump has any idea of what he has in mind,” he said. “I think he’s a big faker.”

The lawyer criticized Sen. John McCain, R-Ariz., the chairman of the Senate Armed Services Committee, for saying his committee would investigate and hold a hearing if it disagrees with the outcome of the case.

Fidell also took issue with a 98-page report issued last week by the House Armed Services Committee that criticized the Obama administration’s decision to swap the five former Taliban leaders for Bergdahl. The report said the committee would ensure that “Sgt. Bergdahl’s behavior is adjudicated as required.” Fidell said he read that as a call to “hammer” Bergdahl for his actions.

“Given this sort of barrage of vilification and now arm-twisting by the Senate and House Armed Services committees, which obviously wield tremendous influence over the military, I have to say that this is very troubling,” Fidell said, adding that a pending court case is not the business of congressional committees.

The U.S. Army Forces Command charged Bergdahl on March 25 with “desertion with intent to shirk important or hazardous duty” and “misbehavior before the enemy by endangering the safety of a command, unit or place.” If convicted, Bergdahl could get life in prison on the misbehavior charge and up to five years for desertion. He also could be dishonorably discharged, reduced in rank and made to forfeit all pay.

Fidell, a military justice expert who is also a visiting lecturer at Yale Law School, said a high-ranking officer charged with deciding whether evidence warrants a court-martial did not follow the advice of a preliminary hearing officer.

Lt. Col. Mark Visger had recommended that Bergdahl’s case be referred to a special court-martial, which is viewed in layman’s terms as a misdemeanor-level forum. That limits the maximum punishment to reduction in rank, a bad-conduct discharge and up to a year in prison.

“I had hoped the case would not go in this direction,” Fidell said.

Bergdahl hasn’t spoken publicly about his decision to walk away from his post, his subsequent five-year imprisonment by the Taliban or the prisoner swap in May 2014 that secured his return to the United States. But during the past several months, he spoke extensively with screenwriter Mark Boal, who shared about 25 hours of the recorded interviews with Sarah Koenig for her popular podcast “Serial.”

Bergdahl says in the interviews that he walked off his base to cause a crisis that would catch the attention of military brass. He wanted to warn them about what he believed were serious problems with leadership in his unit. And he wanted to prove himself as a real-life action hero, like someone out of a movie.

“As a private first-class, nobody is going to listen to me,” Bergdahl says in the first episode of the podcast, released Thursday. “No one is going to take me serious that an investigation needs to be put underway.”

He also discusses the psychological torment of being held captive for years.

“How do I explain to a person that just standing in an empty dark room hurts?” Bergdahl recounts. “A person asked me: ‘Why does it hurt? Does your body hurt?’ Yes, your body hurts, but it’s more than that. It’s mental, like, almost confused. … I would wake up not even remembering what I was.”

In announcing the decision Monday, the Army said a date for an arraignment hearing at Fort Bragg, North Carolina, will be announced later.