FORT BRAGG, N.C. — The military judge who will determine whether Bowe Bergdahl goes to prison heard testimony Thursday from current troops and veterans who said the Army sergeant’s 2009 disappearance in Afghanistan led to severe injuries among those required to search for him, lasting fallout that could become a factor in any sentence he receives.

Witnesses described a mission during the early morning of July 9, days after Bergdahl disappeared. It called for U.S. and Afghan personnel to fan out across remote villages in Paktika province to gather intelligence from local leaders about Bergdahl’s captors or possible location. The team of six U.S. troops and nearly 50 Afghans were attacked by machine gun and rocket propelled grenade fire, leaving several seriously wounded, including one soldier who was shot in the head. In the weeks that followed, the massive search effort would involve thousands of troops.

These injuries are central to the prosecution’s argument that by abandoning his post, Bergdahl, now 31, created greater danger for U.S. troops deployed to eastern Afghanistan. He was captured by the Taliban a short time later and ultimately spent five years in captivity, enduring brutal treatment that has left him permanently injured as well. The Obama White House secured his release in a controversial prisoner exchange in 2014.

Bergdahl pleaded guilty to desertion and misbehavior before the enemy, with the latter charge carrying a maximum sentence of life imprisonment. The judge, Army Col. Jeffery R. Nance, also is expected to rule on a motion to dismiss the case on the grounds that President Trump, who has referred to Bergdahl as a “dirty, rotten traitor,” compromised the soldier’s right to impartial proceedings.

Former infantryman Jonathan Marita told Nance that during their search for Bergdahl an unexploded rocket propelled grenade warhead struck his rifle, nearly severing his right thumb. Pieces of the weapon were found several feet away.

“I thought I was going to definitely die in Afghanistan,” Marita said. He then recalled reciting a verse from the Bible before drawing his pistol to protect himself.

Marita, dressed in a black shirt, black tie and a silver skull-and-crossbones belt buckle, departed the stand and shot an angry glance to the defense. Marita’s left hand — his good hand — was balled and tightened.

Bergdahl’s attorneys have pointed to phrases long uttered by U.S. troops: The enemy gets a vote, and their own decisions affect what happens in combat. And commanders who executed missions that were hastily planned or improperly resourced should shoulder some responsibility for missions that went bad, they have argued.

National Guard Master Sgt. Mark Allen was shot in the head during the initial search effort, multiple witnesses testified, the most severe of the injuries to occur that day.

“Enemy forces were the direct cause of the horrific wounds” to Allen, said Army Maj. Oren Gleich, a defense lawyer.

Allen cannot walk, speak or care for himself. His wife, Shannon, is a caregiver and is expected to  testify about her husband’s condition Monday, among the final witnesses before Nance determines Bergdahl’s fate.

Gleich told the judge that he might object to potential testimony from Shannon Allen that veers into how she was affected, rather than keeping focus on her husband.

Nance ruled in July that Allen, along with a former Navy SEAL who was injured on a separate search mission, would not have been harmed if not for Berghdal’s actions, allowing their testimony to be used in Berghdal’s sentencing.

Staff Sgt. Justin Walters, a National Guardsman on the mission, testified he saw the moment Allen was hit.

“I watched just as a cloud of his blood came out the side of his head,” Walters said, pausing as emotion overcame him on the stand while recalling his efforts to treat Allen. “I was telling him to hang on.”

The defense questioned Walters and others about training and lack of detailed preparation for troops on the mission, underscoring the potential factors that could have played a role in the outcome. Air Force Lt. Col. John Marx led the mission as an intelligence officer. He was not trained in infantry tactics, he testified.

The prosecution played a video Marx took on the mission before the attack to highlight the relevance of Bergdahl to the mission. But it also revealed the simmering resentment many troops felt about the exhaustive search to find him.

“All for a dude who decided to walk off,” Marx narrated in a short clip of the Afghan skyline. “Good times.”

More from Checkpoint: