The US army has dropped its efforts to seize hours of unaired interviews an Oscar-winning screenwriter recorded with Sergeant Bowe Bergdahl.
Mark Boal had sued the government to block a military prosecutor who said he planned to subpoena 25 hours of interviews for possible use at Bergdahl's court-martial for abandoning his post in Afghanistan in 2009.
Boal, who won two Academy Awards as producer and screenwriter for the Iraq war drama The Hurt Locker, asserted his right as a journalist to maintain confidentiality of sources and other information.
"I'm happy that the army ultimately agreed to uphold the traditions of a free civilian press," Boal said in a statement.
The recordings formed the basis for the second season of the popular podcast Serial that focused on Bergdahl's decision to leave and his five years in captivity with the Taliban and its allies.
But the majority of unedited recordings never aired, and Boal said they included confidential discussions and material never meant to be public.
In return for the government dropping its efforts to get the records, Boal will verify material that aired on the podcast if called to testify at Bergdahl's court-martial in North Carolina, lawyer Jean-Paul Jassy said.
Bergdahl of Hailey, Idaho, faces a military trial in April on charges of desertion and misbehaviour before the enemy - a conviction that carries a possible term of life in prison.
He is seeking a pardon from President Barack Obama.
