How America Lost Its Secrets: Edward Snowden, the Man and the Theft. By Edward Jay Epstein. Knopf; 350 pages; $27.95.

THE effects of Edward Snowden’s heist of secrets from America’s National Security Agency (NSA) in 2013 can be divided into the good, the bad and the ugly, writes Edward Jay Epstein in a meticulous and devastating account of the worst intelligence disaster in the country’s history, “How America Lost Its Secrets”.

Even that categorisation is contentious. Mr Snowden’s fans do not believe he did anything wrong at all: he simply lifted the lid on a rogue agency, risking his liberty on behalf of privacy everywhere. For their part, his foes believe his actions lack any justification: he is a traitor masquerading as a whistle-blower, who exposed no wrongdoing but did colossal damage.

These stances rest more on faith than facts. Their adherents regard as secondary the details of Mr Snowden’s career, and the means by which he took millions of pieces of top-secret information from the NSA’s computers. More important for such people is whether you trust American and other Western institutions, or regard them as inherently corrupt and oppressive.

Mr Snowden’s fans believe that the authorities, especially intelligence agencies, lie about everything. Nothing they say about the case can be believed. Any peculiarities—such as inconsistencies in Mr Snowden’s public statements, or the fact that he now lives in Moscow as a guest of Russia’s security service, the FSB, are mere side-issues, easily explicable by exigency and urgency. For his foes, nothing Mr Snowden says is trustworthy, whereas statements made by officials are true.

Mr Epstein is a formidable investigative journalist and his quarry is worthy of his talents. He has unearthed many new details and assembles them, with the publicly known information, into a coherent and largely damning account.

The first part of the book examines Mr Snowden’s rather patchy professional career. He was neither (as many believe, and he has claimed) a successful and senior intelligence officer, nor was he a computer wizard. Mysteriously, possibly through his family’s extensive connections with the spy world, he joined the CIA, but proved untrustworthy and incompetent. On leaving, he kept his security clearance, making him eligible for a good job in the private sector, where computer-literate ex-spooks are at a premium. But secrecy rules meant that nobody could check on his past.

The author agrees that Mr Snowden performed a “salutary service in alerting both the public and the government to the potential danger of a surveillance leviathan”. The “bureaucratic mission creep”, he argues, “badly needed to be brought under closer oversight by Congress”. He also notes that Mr Snowden inadvertently highlighted the security consequences of “contractorisation”—outsourcing spook work to the private sector.

But he also shows that the vast majority of stolen documents had nothing to do with Mr Snowden’s purported concerns about privacy and government surveillance. He switched jobs in order to have access to much bigger secrets. He gave away American technical capabilities—such as the ability to snoop on computers that are not connected to the internet—which are of real value in tracking criminals, terrorists and enemies. To believe that was justified, you have to regard America as being no better than Russia, China or al-Qaeda. He also stoked an ugly, misplaced cynicism about the trustworthiness of government.

Mr Epstein is cautious on the biggest question: whether Mr Snowden was acting alone, or under the control of Russian intelligence. The crucial evidence, he says, is Mr Snowden’s contact with digital-privacy activists such as Glenn Greenwald. No Russian handler would allow a well-placed and valuable spy to make such a risky move, Mr Epstein argues. Better to keep him in place, to steal yet more secrets.

That may be too categorical. The intelligence world is full of bluffs and double-bluffs—and errors. Agents misbehave. Aims change over time. But certainly nobody reading this book will easily retain faith in the Hollywood fable of Mr Snowden’s bravery and brilliance.