ENEMIES WITHIN: Inside the NYPD’s Secret Spying Unit and bin Laden’s Final Plot Against America. By Matt Apuzzo and Adam Goldman. Touchstone Books. 366 pages. $27.99.

In their reporting on a vast police spying operation that targeted Muslim New Yorkers, journalists Matt Apuzzo and Adam Goldman homed in on a central challenge facing a post 9/11 America. They wrote in one of a series of stories in 2011: “One of the enduring questions of the past decade is whether being safe requires giving up some liberty and privacy.”

Since Apuzzo, Goldman and other Associated Press journalists who worked on the spying series won the 2012 Pulitzer for investigative reporting, Americans have grown ever more uneasy about the costs of the war on terror. Journalists like Apuzzo and Goldman have given us the information we need in an urgent national conversation.

Now, Apuzzo and Goldman have written a book that digs more deeply into what they came to see as the New York Police Department’s attempt to build its own “miniature CIA.” If you’re a citizen, you need to read “Enemies Within: Inside the NYPD’s Secret Spying Unit and bin Laden’s Final Plot Against America.”

Apuzzo and Goldman frame their narrative within the story of a plot the nation’s largest police department failed to uncover despite compiling maps of where Muslims live in New York, sending officers to take notes on conversations in cafes and restaurants in the city’s Arab neighborhoods and designating mosques as “criminal enterprises” in order to maximize their oversight powers.

“When it mattered most, those programs failed,” Apuzzo and Goldman write after describing how NYPD spies visited Najibullah Zazi’s mosque in New York and the travel agency where he bought tickets to fly to Pakistan for al-Qaida training, but missed the young Afghan immigrant and his radicalization. In 2010, Zazi pleaded guilty to terrorism charges and confessed to plotting to bomb New York’s subway system. The plot was foiled largely by the FBI.

Apuzzo and Goldman quote a supporter of New York Police Commissioner Ray Kelly as saying the NYPD foiled at least 14 Islamic terrorist plots. Those numbers are questioned.

“The NYPD’s combination of publicity and secrecy prevented people from assessing whether its intelligence programs worked and are worth the cost in money and trust,” write Apuzzo and Goldman, who went over hundreds of internal police memos and interviewed intelligence sources.

The book is peopled with spies, terrorists and decorated war heroes. The prose is declarative and compelling, with touches of humor.

New York police chief Kelly brought in a former CIA analyst to build “a deep roster of undercover officers, a web of informants and a team of linguists and analysts that were unrivaled by any police department in the country.”

The operation, with a budget of $43 million and 400 staffers, took cues from Israel even though, as the authors point out, Brooklyn and Queens “were not occupied territories or disputed land.” New York police officers were posted to London, Tel Aviv and Lyon. Really?

Yet, the book is sympathetic to police officials determined, even desperate, to protect a city that had been the target of a devastating terrorist attack. The most pointed criticism is for those who failed to provide the oversight necessary in our check-and-balance democracy.