WASHINGTON — He’s being charged with desertion and faces the possibility of life in prison, but Sgt. Bowe Bergdahl could end up cutting a deal that keeps him out of jail while receiving health benefits from the Veterans Administration, legal experts say.

“I think it’s a very messy case for the government to actually try. I think it’s going to resolve with some sort of alternative disposition,” attorney Greg Rinckey, a military-law specialist, told The Post.

Bergdahl’s lawyer “would probably be happy with one that preserved the client’s VA benefits,” he added.

Jeffrey Walker, a St. John’s University law professor and former military lawyer, said Bergdahl can plead for leniency because of reports of his hellish treatment as a Taliban captive for five years.

“It wouldn’t surprise me at all if what he ended up with was a dishonorable discharge and no jail time,” Walker said.

The government Wednesday announced charges against Bergdahl of desertion and misbehavior in facing the enemy. He disappeared from his post in Afghanistan in 2009, and was captured by the Taliban.