Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

FORT BRAGG, N.C. — Army Sgt. Bowe Bergdahl was a "gold mine" of intelligence, helping the military better understand insurgents and how they imprison hostages, two agents testified Tuesday as defense attorneys sought to show the soldier's contributions since he was returned in a prisoner swap.

The testimony at Bergdahl's sentencing was meant to counter prosecution evidence favoring stiff punishment, including testimony from several service members who described wounds they suffered on search missions after Bergdahl disappeared in 2009. Bergdahl faces up to life in prison after pleading guilty to desertion and misbehavior before the enemy for walking off his remote post in Afghanistan.

The Army judge has wide leeway to decide Bergdahl's sentence because he didn't strike a plea agreement with prosecutors.

Amber Dach, who spent 16 years in military intelligence, was the primary analyst assigned to Bergdahl's case for the five years after he disappeared. She described how eager he was to help intelligence officials at a hospital in Germany days after he was returned to U.S. authorities. Although his voice was weak and raspy, he helped authorities and even drew diagrams in his downtime to bring to his next debriefing session.

Dach and another official who debriefed Bergdahl testified that his time in Germany was extended partly so he could offer additional time-sensitive intelligence.

"He was very motivated to just download all of the details that he recalled," Dach testified. "It was a gold mine. It really reshaped the way we did intel collection in the area."

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

An official from the military agency that helps reintegrate former captives and develops survival training for service members also testified that Bergdahl's information was invaluable.

Army Sgt. Bowe Bergdahl, left, is escorted into court for the fifth day of sentencing proceedings in his court-martial at Fort Bragg, North Carolina, on Tuesday. Jonathan Drake / Reuters

Terrence Russell, a division chief for the Joint Personnel Recovery Agency, developed a 1,200-page transcript from debriefings of Bergdahl that was turned into a database. The information produced reports on tactics used by insurgents and hostage-takers in the region that are still used by the military, Russell said.

Related: Bowe Bergdahl Cries and Apologizes on Stand During Sentencing

Russell said that he'd like to learn even more from Bergdahl but that the legal case had impeded that.

"Can you give him to me tomorrow? I need him. I need him now," he said to a defense attorney. "The fact that I can't get that information is wrong. I need that."

Russell reaffirmed his previous statements that Bergdahl's captivity was worse than that experienced by any other U.S. prisoner of war since the Vietnam era.

Related: Bergdahl Hearing Focuses on Soldiers Who Were Hurt Looking for Him

On Monday, Bergdahl began the defense presentation by apologizing to those who were wounded searching for him. He described the brutal conditions he faced, including beatings with copper wire and unending bouts of gastrointestinal problems brought on by squalid conditions. He said he was kept in a cage for four out of the five years in captivity after several escape attempts. He said his muscles became so weak that he could barely stand or walk.

The defense showed the court images of a replica of the cage that Russell's agency built, using Bergdahl's sketches. Russell uses it for survival training.

Bergdahl, 31, of Hailey, Idaho, was brought home by President Barack Obama in 2014 in a swap for five Taliban prisoners held in the U.S. prison at Guantanamo Bay, Cuba. Obama said at the time that the United States doesn't leave its service members on the battlefield.

Republicans roundly criticized Obama, and Donald Trump went further while campaigning for president, repeatedly calling Bergdahl a "dirty, rotten traitor" who deserved to be executed by firing squad or thrown out of a plane without a parachute.

Bergdahl's sentencing hearing is expected to last several more days.