Members of the European parliament in Strasbourg, in March this year, hold up masks depicting Edward Snowden

No Place to Hide: Edward Snowden, the NSA and the Surveillance State, by Glenn Greenwald, Hamish Hamilton, RRP£20/Metropolitan Books, RRP$27, 272 pages

With a Pulitzer in the bag, Hollywood knocking on the door and a newfound status as one of the world’s most celebrated journalists, Glenn Greenwald can now tell the awkward story about how he very, very nearly missed out on the scoop of the decade.

Greenwald was one of the small group of reporters to whom Edward Snowden chose to leak a huge stash of documents about the US National Security Agency. No Place to Hide is his account of the events and the material that helped spark a ferocious debate around the world about the rights and wrongs of government surveillance in the digital age.

Six months before the first leaks, Greenwald received an email from someone claiming to have information about the NSA. But the correspondent insisted Greenwald use all sorts of online security procedures he did not understand, so the trail went cold. After another journalist and friend, Laura Poitras, arranged a meeting with Snowden in Hong Kong, he got back in touch with the contact from months before – to find that this was the same person he had just met.

The near-misses did not end there. While in Hong Kong, Greenwald sent a resignation letter to the Guardian because he thought the paper’s editors were stonewalling on going to print. His doubts were misplaced. The first story, about the NSA holding information on the phone calls of millions of Americans, was already being readied for publication. It was the start of the Snowden saga.

Ever since then Greenwald, who left the Guardian last October, has had a long line of reporters queueing outside his house in Rio de Janeiro to hear the story (I am one of the guilty parties). Yet he has somehow still managed to make the tale seem fresh. The first third of his book is a genuinely gripping account of his encounters with Snowden. Jason Bourne meets The Social Network: the film rights for this one will sell themselves.

Snowden instructed Greenwald to find the meeting room in his Kowloon hotel with a plastic alligator on the floor. He entered carrying a Rubik’s Cube (“unsolved”) and responded to a prepared question about the hotel food. Back in Snowden’s room and with their mobile phones in the fridge to prevent prying ears, the former lawyer Greenwald questioned him for five hours. Snowden confessed that some of his political ideas had been gleaned from video games, which provided the lesson “that just one person, even the most powerless, can confront great injustice”.

The book adds little fresh material on the NSA but, by putting all the reporting in one place, Greenwald gives an effective sense of the sheer scope of information that is being hoovered up. In one particularly clumsy slide, the NSA brags that its goals include: “Sniff it All”, “Know it All”, “Exploit it All”, “Collect it All”.

In selecting Greenwald as his main media interlocutor, Snowden chose well. Greenwald has pursued the story with passion, ensuring that the documents have achieved the widest possible impact. He has also been a tireless defender of Snowden, even after his recent disastrous appearance on a Vladimir Putin call-in show.

But that single-mindedness, mixed with self-regard, is also Greenwald’s great weakness. He lives in a world of black and white, where all government officials are venal and independent journalists are heroes. “There are, broadly speaking, two choices: obedience to institutional authority or radical dissent from it,” he writes.

As a result, the book grates as much as it fascinates. He is much happier throwing bombs than answering the really difficult questions. Greenwald spends a long time detailing Prism, the programme that collects emails and other content from the world’s main internet companies and which is the cause of much of the anger against the NSA overseas. But Ron Wyden and Mark Udall, two senators who have been fierce critics of the NSA and whom Greenwald regularly cites, said last year the programme helped foil “multiple terrorist plots”. The easy bit is to say the NSA is overreaching. Yet where to draw the line?

For all his scorn for the government, Greenwald reserves special contempt for what he calls the “establishment press”, the reporters, editors and presenters he believes coddle the powerful – some of whom have subtly dissed Greenwald with labels such as “blogger” and “activist”. He has some good sport at the expense of David Gregory, the host of the talk show Meet the Press who asked him, “why shouldn’t you, Mr Greenwald, be charged with a crime?”. Yet his self-righteous contempt for the Washington Post and the New York Times makes light of some of the extraordinary reporting those papers have produced in recent years.

In the end, Greenwald underplays the real media problem. The NSA is in many ways a product of the feverish ways in which terrorism is portrayed. The bomb at last year’s Boston marathon was a horrific event, killing four people, but it also produced dramatic overreaction. For a week the media talked of little else. The entire city of Boston came to a halt during a weekday because a 19-year-old fugitive was on the run. Some of the same commentators who have denounced the NSA for snooping criticised the government for not knowing more about the inner lives of the Tsarnaev brothers.

For any president, the conclusion is easy. Aggressive surveillance may be unpopular but it would be political death for a big terrorist attack to slip through that he or she could have done more to stop. Greenwald believes the NSA is evidence of the state’s never-ceasing desire for control. Instead, it is much more a reflection of a media and political climate that prevents an honest discussion about the reality and risks of terrorism.

Geoff Dyer is the FT’s US diplomatic correspondent