This week, in a federal courtroom, I’ve heard a series of government witnesses testify behind a screen while expounding on a central precept of the national security state: The CIA can do no wrong.

Those CIA employees and consultants are more than mere loyalists for an agency that soaks up $15 billion a year and continues to loosen the bonds of accountability. The docket says “United States of America v. Jeffrey Alexander Sterling,” but a more discerning title would be “National Security State v. The Public’s Right to Know.”

For the first time in 30 years, a case has gone to trial in a civilian court under the Espionage Act with charges that the defendant gave classified information to news media. Not far from the CIA headquarters in Northern Virginia, legal jargon is flying around the courtroom, but the law has very little to do with this case.

Top officials in the U.S. government leak classified information all the time, without punishment. But Jeffrey Sterling was not a top official. He’s a former CIA officer, charged with giving classified information to journalist James Risen about a CIA operation that provided Iran with flawed nuclear weapon blueprints — information that appeared in Risen’s 2006 book State of War.

Hearing the testimony from CIA operatives, it’s clear that the agency is extremely eager to make an example of Sterling. Despite all the legalisms, the overarching reality is that the case against Sterling is scarcely legal — it is cravenly political.

If it were otherwise, the last two CIA directors to leave their posts — General David Petraeus and Leon Panetta — would be going through the same kind of ordeal that Sterling has been enduring. There’s hefty evidence that both Petraeus and Panetta leaked classified information while running the agency. But these days they’re busy getting rich, not in danger of imprisonment for the rest of their lives.

On Wednesday, the jury heard vague and emphatic claims that Sterling jeopardized the safety of a “human asset” and his family by revealing information about a CIA operation. But the first page of Chapter Nine in State of War reveals a self-inflicted CIA catastrophe in Iran that Sterling had nothing to do with.

Sterling no longer worked for the CIA when the disaster occurred in 2004. An officer at the agency’s Langley headquarters made the mistake of sending data to an agent that “could be used to identify virtually every spy the CIA had inside Iran,” Risen reported. And the recipient of the data was actually a double agent. Risen wrote: “The agent quickly turned the data over to Iranian security officials, and it enabled them to ‘roll up’ the CIA’s agent network throughout Iran.”

That information hardly fits with the agency’s profuse efforts to scapegoat Jeffrey Sterling for its operational woes in Iran. There was no public accountability for the huge screw-up that led to the rollup of agents inside Iran. Vastly more important, there was no public accountability for top CIA officials who cravenly helped to lie the United States into invading Iraq a dozen years ago with the pretext of (nonexistent) Iraqi WMD.

In sharp contrast, it has been quite convenient for the CIA to try to crush whistleblower Jeffrey Sterling, who — whether or not he was a source for Risen’s State of War book — by all accounts went through channels to let the Senate Intelligence Committee know about Operation Merlin, the reckless CIA maneuver that gave nuclear weapon blueprints to Iran in 2000.

In an opening statement earlier this week, Sterling attorney Edward MacMahon hit a key point when he said: “A criminal case is not a place where the CIA goes to get its reputation back.” He noted that “the same CIA was telling us all that there were weapons of mass destruction in Iraq.”

The CIA hierarchy continues to have no interest in accepting responsibility for its deceptions, no matter how horrific the results. But the agency has been hell-bent on making a scapegoat out of Sterling, a mid-level employee who was one of the agency’s very few African American case officers.

From the lofty heights of CIA officialdom, Sterling’s sins were unforgivable. Based on his experiences inside the CIA, he had the temerity to pursue a racial discrimination lawsuit against the agency. And he later told Senate oversight committee staffers about a highly dubious CIA operation that risked adding to proliferation of nuclear weapons.

Those actions were quite proper. But a decade ago they surely antagonized high CIA officials, including John Brennan — now the CIA’s director, and a powerful adviser to President Obama.

The CIA’s offending whistleblower is now a defendant in legal proceedings that are poisoned fruits of a political vendetta. While doing whatever damage control it can for itself, the CIA is doing all it can to damage the life of Jeffrey Sterling.

Norman Solomon is the executive director of the Institute for Public Accuracy and the author of War Made Easy: How Presidents and Pundits Keep Spinning Us to Death. He is a co-founder of RootsAction.org.