Officials who want to write about their former government service must wade through a tangle of dense red tape and clearance regulations, and sometimes risk their fortunes and their freedom. Several have faced expensive lawsuits, alleged clearance violations, accusations of espionage, and even imprisonment, just for telling their stories.

That’s just what happened to retired Navy Commander Guy Snodgrass, who served for 17 months as speechwriter to former defense secretary James Mattis. The Defense Department slow-rolled approval of his manuscript, Holding the Line: Inside Trump’s Pentagon with Secretary Mattis, which publisher Penguin Random House billed as “an insider’s sometimes shocking account” of Mattis’ tenure.

Mattis said Snodgrass’ book violated his trust, and the Pentagon dragged its feet on approving it, claiming that conversations Snodgrass had written about were “off limits.” After Snodgrass filed a lawsuit, and Mattis completed a whirlwind media blitz after his own book, Call Sign Chaos, was released on September 3, those concerns suddenly disappeared.

In an email obtained by The American Conservative, Mattis wrote to Snodgrass that his book 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.”

“I believe that you are aware that non-public information is not to be shared,” Mattis wrote. “Further that you understand that you would have been in none of those meetings, taking none of those notes your publisher high-lighted in the initial press release that you sent to me, had I known you intended to violate that trust.”

Snodgrass was told by Defense Department official George R. Sturgis, chief of the Defense Office of Prepublication and Security Review, “that senior leaders have directed my office to hold our response pending the outcome of high level discussions.”

There’s just one problem: there’s no legal duty to “protect the confidences” of high-ranking officials; there’s only the classification system, according to attorney Mark Zaid, who specializes in national security law and represents Snodgrass.

Unfortunately, it’s really easy to keep information that’s embarrassing to the government out of public view by stalling the manuscript review process so that a book misses the news cycle, or to over-classify documents that do not require the designation.

“What is classified is really subject to discretion so the system permits abuse,” said Zaid. “There are also a lot of intimidation tactics, which is what Snodgrass encountered.”

That intimidation included threatening letters from Robert Easton, director of the Office of Litigation Counsel, and a statement from Mattis’ deputy chief of staff, Peter Verga: “If you do anything to harm the reputation of the department, you are done.”

The Defense Department objected to Snodgrass recounting what took place inside “the Tank,” the conference room where the Joint Chiefs of Staff meet. These discussions are not classified, but the department claimed they were “off limits.”

Barring disclosure of what happens in the Tank is “longstanding protocol” because “there is a norm, a cultural norm, that we don’t talk about what goes on in the Tank”: “it’s a “hyper-sacred place,” anonymous Defense officials told Foreign Policy.

“The concern expressed by the Joint Chiefs…is legally irrelevant,” Zaid argued. “Nothing…statutorily or legally prohibits Snodgrass from publishing unclassified information that originated in the Tank, or elsewhere.”

After several months of back-and-forth went nowhere, Snodgrass last week filed a lawsuit against the Defense Department, alleging that his book contains no classified information and that the Pentagon unlawfully dragging its feet has hurt book sales. In the end, the DOD backed down and approved the book with only minor redactions on Wednesday.

“This was an attempt at censorship, much like what happened with my book, Operation Dark Heart,” said former Army intelligence lieutenant colonel Anthony Shaffer in an interview with The American Conservative.

♦♦♦

Like Snodgrass, Shaffer hired Zaid to defend him after the Defense Intelligence Agency hounded him over disclosures made in his book. Shaffer wrote that the Able Danger project he’d worked on had identified four of the September 11 hijackers months earlier than the 9/11 Commission reported.

Dark Heart had already been cleared by Army censors, printed and published, when the DIA suddenly declared that the book contained accounts of clandestine operations and black-ops programs that could “cause serious damage to national security.”

The DIA was so intent on making sure the public never learned about its intelligence mistakes that the DOD spent $47,300 to shred all 9,500 printed copies of the book. This unprecedented censorship made front-page news on the New York Times, and the resulting controversy propelled the second, heavily redacted version that followed onto its bestseller list.

Although Shaffer ultimately prevailed in a First Amendment suit against the Pentagon, that didn’t stop the DOD from taking issue with his second book, a novel, which they claimed revealed classified information, even though what it discussed was a patent that was both unclassified and openly available.

And therein lies a serious problem.

“The government can delay. They can threaten you with nuisance suits. They know how much that’s going to cost you. It costs the government nothing to go to court and file a complaint. It costs you thousands of dollars to file a response. Even if there’s nothing to the government’s case, that process can bankrupt an author,” said Peter Van Buren in an interview with The American Conservative. The State Department accused Van Buren of exposing classified material in his account of his time in Iraq.

“These processes can be very, very, slow and smart lawyers have lots of ways to delay things,” Van Buren said. “Sometimes just delaying something long enough for time to pass or an election to happen, that’s enough to destroy a book’s value.”

Before Van Buren, most former State Department officials wrote either gauzy memoirs, travelogue-style books about their times in far-flung corners of the globe, or academic treatises that analyzed policies, several decades after the fact.

These books “held the State Department line better than the State Department, or they dealt with historical subjects,” said Van Buren.

Because of this, the State Department’s procedures were “very sleepy,” and routinely approved books after 30 days without careful review. That’s what happened with Van Buren’s We Meant Well: How I Helped Lose the Battle for the Hearts and Minds of the Iraqi People. The book details Van Buren’s year-long “encounter with pointless projects, bureaucratic fumbling, overwhelmed soldiers, and oblivious administrators secluded in the world’s largest embassy, who fail to realize that you can’t rebuild a country without first picking up the trash,” according to the book’s cover. It’s a “tragicomic voyage of ineptitude and corruption that leaves…readers appalled and disillusioned but wiser.”

Needless to say, that’s not the sort of book that the State Department wants the public to see.

After the State Department approved Van Buren’s draft, they attempted to stop its publication by claiming it contained classified material.

In fighting for his book, Van Buren benefited from pro bono representation.

“If I had to pay my legal fees, I would have had to handle the whole case differently; I would have had to be in a defensive position from day one,” said Van Buren. “The kind of lawyers you really need for this are going to run you $400 to 600 an hour…. it’s one of the tricks the government uses against you,” he said.

Van Buren eventually succeeded in negotiating a deal with the State Department that allowed him to retire with full benefits, his book published.

♦♦♦

For former department chiefs, or those who write glowing memoirs that parrot the government’s narrative, there appears to be a completely different set of rules, said Van Buren.

“When the Pentagon wants another heroic Navy SEAL book out there, they don’t seem to care what kind of classified information is revealed because it helps them recruit and makes them look good,” he said. “But when a book comes out that is critical of the government, then suddenly everyone is worried about classified information. That’s the problem: not the classification system itself, but the way it’s manipulated by the government for it’s own purposes.”

Consider the treatment afforded to Hillary Clinton after she stored government emails on a private server. Or what happened to former FBI director James Comey: while the Inspector General ruled that he’d improperly leaked damaging details of an official meeting with President Trump, the Department of Justice declined to prosecute.

Former CIA director Leon Panetta leaked the name of the Navy SEAL who killed Osama bin Laden during a top secret classified speech in a CIA auditorium, and deputy CIA director Michael Morell allowed Zero Dark Thirty‘s director to see a classified mock-up of the bin Laden compound. Instead of reprimand, the Inspector General went to great lengths to cover up the “top-level access to the most classified mission in history” Hollywood filmmakers had received.

Former CIA director General David Petraeus shared the classified names of 10 undercover CIA officers with his biographer and mistress and lied about it to the FBI, a felony offense for which he was never charged. Instead he was found guilty of a misdemeanor and received just two years’ probation and a fine. Scooter Libby shared just one name and received 30 months in prison, a fine, and two years’ probation.

None of these Obama administration lackeys were charged under the Espionage Act.

Contrast their treatment to what happened to John Kiriakou, the only person to go to prison in connection with the CIA’s torture program. Kiriakou didn’t torture anyone—he was simply the first official to publicly confirm that the U.S. was waterboarding terrorists and that waterboarding is torture. While the Bush administration Department of Justice found that Kiriakou had done nothing criminal, Obama’s DOJ went after him with a vengeance.

The former CIA counterterrorism officer and senior investigator with the Senate Foreign Relations Committee believes he was prosecuted because he “aired the agency’s dirty laundry,” and his supervisor John Brennan, who led the CIA under Obama, wanted to make an example of him. The process of discovery revealed 15,000 pages of documents, among them a memo from Brennan directing Attorney General Eric Holder to charge Kiriakou with espionage, even though DOJ attorneys didn’t think they had a case.

In the end, like many of the other Obama-era security related prosecutions, Kiriakou was charged under the heretofore obscure 1917 Espionage Act, a law designed to punish spies, not retaliate against whistleblowers. He was the Obama administration’s sixth national security leak prosecution, a total higher than all past presidencies.

Accused of revealing the identity of a covert agent because he passed along an officer’s business card, Kiriakou spent over $1 million of his own money fighting four felony counts. He eventually took a plea deal that sentenced him to 30 months in prison.

Kiriakou was not the only whistleblower to receive this disproportionately heavy-handed treatment. Obama’s DOJ also charged National Security Agency whistleblower Thomas Drake with espionage. Drake faced 10 felony counts for documents in his possession that were clearly marked unclassified. But in an effort to silence him, the agency retroactively changed their classification. After public outcry over his prosecution, the DOJ backed down, and Drake plea-bargained his alleged crimes down to a misdemeanor.

Others were not so fortunate. Jeffrey Alexander Sterling was indicted under the Espionage Act for contact he had with journalist James Risen. He was sentenced to three and a half years in prison. And a case against Risen was pursued all the way to the Supreme Court, where justices ruled against the journalist, before Holder abandoned prosecution.

♦♦♦

The Espionage Act criminalizes the wrongful retention of information that probably should not have been classified in the first place to the same degree that it does the willful sale of state secrets to foreign intelligence agencies. That’s according to Stephen Vladeck, a constitutional law professor at American University, who added that as a tool for prosecuting leakers, it’s “a broad sword where a scalpel would be far preferable.”

Although the presidency has changed hands, nothing has disrupted the culture of secrecy and intimidation that departments wield over former officials.

“Both political parties want the government to retain the authority to very severely limit information, even if it’s not classified,” said Shaffer. That applies in particular to whistleblowers and embarrassing information that makes officials and even administrations look inept.

Even when the government does not have a valid legal argument, fighting court battles against an army of government lawyers takes a lot of effort, time, and money. And publishing companies don’t typically reimburse those expenses.

The government doesn’t always have the last say, however. Mattis may not like it, but Snodgrass’ book will be published.

Public comments from the Pentagon on the book were “cowardly, anonymous,”

and “backhanded,” Zaid wrote on Twitter. “So typical. DoD, if you try this again, I will be there once more to sue. Each–And–Every–Time.”

Barbara Boland is The American Conservative’s foreign policy and national security reporter. Follow her on Twitter @BBatDC.