The Pentagon has warned former defense secretary Jim Mattis’s onetime speechwriter that he could face “a range of potential consequences” if he reveals classified information in a forthcoming book or unclassified details that defense officials determine violate "the trust” of Mattis, according to letters and memos obtained by The Washington Post.

Retired Navy Cmdr. Guy Snodgrass, who worked for Mattis for 17 months and retired in August 2018, has sued the Defense Department, alleging that the Pentagon has imposed prior restraint on his book by dragging out a review of his manuscript for months. The department “deliberately failed to fulfill its lawful obligations" and has imposed “inappropriate and legally inapplicable requirements” on Snodgrass, the lawsuit argues.

The book, “Holding the Line: Inside Trump’s Pentagon with Secretary Mattis," is billed by publisher Penguin Random House as an “insider’s sometimes shocking account of how Defense Secretary James Mattis led the U.S. military through global challenges while serving as a crucial check on the Trump Administration.” It originally was scheduled for publication Oct. 29, but that will be delayed because of the Pentagon’s continued hold on the work, according to the lawsuit.

The dispute has emerged as Mattis releases his own book, “Call Sign Chaos: Learning to Lead,” in which he details his 41-year career as a Marine officer and briefly touches on his time in the Trump administration. He has said in several interviews that he will not make assessments of President Trump’s fitness in office, citing a perceived need to act in an apolitical manner despite having held a political appointment as defense secretary.

Snodgrass, in an affidavit filed late Tuesday, said he contacted Mattis about “Holding the Line” in March. The former Pentagon chief responded in an email that he regretted that Snodgrass appears "to be violating the trust that permitted you as a member of my staff to be in private meetings in my office, where those of us carrying the responsibilities believed that all could speak openly in pre-decisional discussions,” Snodgrass said in the affidavit.

Snodgrass said he was informed by the Pentagon last month that the review for classified material in his book has been completed but was told in an Aug. 23 telephone conversation that senior Pentagon officials had directed the Defense Department Office of Prepublication and Security Review to withhold clearing it “pending the outcome of high-level discussions.”

Snodgrass said in a brief phone interview Tuesday that he “remains committed to working with the Defense Department” to resolve concerns about the project.

Mattis, who resigned in December while citing disagreements with Trump, could not be reached for comment.

Air Force Col. DeDe Halfhill, a Pentagon spokeswoman, said defense officials are reviewing the lawsuit and consulting with the Justice Department.

“I have no further information to provide at this time,” she said.

The lawsuit, filed last week and first reported on by NBC News, describes how the Pentagon allegedly responded after the book’s publisher announced its scheduled release. Letters and memos obtained by The Post lay out the disagreement in greater detail.

A Pentagon lawyer, Robert E. Easton, sent a letter to Snodgrass in March to warn him that he was required to submit the work for a review to assess whether it contains classified information, a common step for books published by service members. Easton also questioned whether Snodgrass had removed government records from Pentagon custody, citing the publisher’s claim that Snodgrass kept “meticulous notes” of his time working for Mattis.

Snodgrass’s attorney, Mark Zaid, responded a week later that his client was “well aware of his prepublication requirements" and planned to work with the Pentagon. Zaid added that he was “not aware” of Snodgrass having any materials that needed to be returned to the Defense Department.

In July, Zaid sent another letter in which he took issue with how the staff of Marine Gen. Joseph F. Dunford Jr., the chairman of the Joint Chiefs of Staff, screened Snodgrass’s book. Joint Staff officials wanted to remove nearly three chapters that detailed conversations in “the Tank,” the conference room in which the Joint Chiefs of Staff meet.

Zaid wrote, “I know you are aware that the only type of information that the U.S. Government can legally prohibit a non-governmental official from publishing is classified information.”

But Easton disputed that. In a response to Zaid in late July, he wrote that Snodgrass’s obligations extend beyond safeguarding classified information.

“His oath of office and personal integrity impart a special obligation to protect such information regardless of classification,” Easton wrote, adding that “there is a range of potential consequences for violating that oath.”

Easton cited a Navy Department document that lays out how the Pentagon can demote someone in rank in retirement.

“I do not know how else to take that comment other than a threat that my rank could be reduced if I did not comply with DoD’s requirements,” Snodgrass said in the affidavit.

Easton cited an additional memo signed by Mattis in October 2017 that was “written in large part by Mr. Snodgrass” and warned that it is “a violation of our oath to divulge, in any fashion, non-public DoD information, classified or unclassified.”

“Our integrity as individuals and as a Department imparts special responsibility on each of us to protect secrets,” the Mattis memo said. “Cavalier neglect of protecting non-public information, classified or unclassified, or intentional release of information to unauthorized persons is a serious matter to this Department. Our duties to office and country demand we preserve and protect all matters vital to defending this Nation.”

Zaid, reached Tuesday, said Snodgrass wants to help explain how the Pentagon worked under Mattis but nonetheless “anticipated some blowback.”

In an Aug. 7 letter to Easton, Zaid argued that the only point the Pentagon can argue is whether the conversations that Snodgrass describes occurring in the Tank are classified. The location of the conversations alone does not prevent Snodgrass from detailing them, Zaid wrote, noting that former defense secretaries Ash Carter, Leon Panetta, Robert Gates and Donald H. Rumsfeld did so in their own books.

Snodgrass wrote in his new affidavit that he believes it is his “lifelong responsibility to preserve the special trust and confidence placed in me to protect classified information,” but that to date, nothing has been identified as classified.

“I had no other recourse," Snodgrass said, “other than legal action to compel the release of my Manuscript’s clearance letter.”