Photo: Sarah Silberg

On the morning of September 11, the detectives of the New York Police Department’s Intelligence Division traveled in force toward the burning towers of the World Trade Center, the biggest crime scene in American history, to find absolutely nothing for themselves to do. The city had been quickly cordoned off. Some made it as far as Chambers Street. Others were stopped at Canal Street. “Stand by,” they were told. They milled about for hours, waiting for orders that never came. Finally, a contingent of officers was dispatched toward ground zero with garbage cans to collect guns and equipment left by fallen first responders.

Later in the day, a group of them gathered at the Police Academy, where Deputy Chief John Cutter told them to start contacting their informants. At that moment, it may have been the only possible command—which didn’t mean it was a useful one. Despite the name, the Intelligence Division was mostly concentrated on gangs and drug dealers, as well as providing a glorified chauffeur service for visiting dignitaries. International terrorism had never been part of their purview.

But they had to start somewhere, and the detectives did what they were told, reaching out to their network of informants—dope dealers and gang members—to ask what they knew about the worst terrorist attack in U.S. history.

For the next few months, the Intel cops worked alongside the FBI out of makeshift command centers aboard the decommissioned USS Intrepid and in an FBI parking garage, where detectives sat on the concrete floor, responding to a flood of tips pouring in from a public consumed with the possibility of another attack, questioning Muslims whose neighbors suddenly deemed them suspicious.

When Ray Kelly was sworn in as police commissioner in January 2002, one of his first goals was to eliminate that kind of aimless fumbling. The first man to rise from cadet to police commissioner and the first person to hold the top job twice, Kelly was police commissioner under Mayor David Dinkins, when terrorists detonated a truck bomb in the garage below the World Trade Center’s North Tower in 1993.

Though Kelly’s detectives were instrumental in solving that bombing, they’d never had a chance to prevent it. And that attack had done nothing to change the attitude of the federal government—specifically the FBI—which rarely gave local police information it could use ahead of time.

After 9/11, the debris field smoldering a block away from Kelly’s Battery Park apartment crystallized the notion that as long as the federal government controlled all the information, the NYPD was merely waiting to respond to the next attack, helpless to prevent it.

So Kelly called for a new approach, the likes of which America had never seen. Over the ensuing decade, the FBI, CIA, and NSA would build surveillance programs that monitored bank transactions, phone records, and the e-mail routing fields known as metadata, which have recently erupted in the scandal surrounding Edward Snowden’s revelations. But the NYPD went even further than the federal government. The activities Kelly set in motion after 9/11 pushed deeply into the private lives of New Yorkers, surveilling Muslims in their mosques, their sporting fields, their businesses, their social clubs, even their homes in a way not seen in America since the FBI and CIA monitored antiwar activists during the Nixon administration. It was a proactive approach, but, in constitutional terms, a novel one.

To reinvent the Intelligence Division, Kelly called on David Cohen, a former senior CIA officer who was a year into a post-retirement stint with the Wall Street insurance giant American International Group. Kelly offered a rare opportunity not just to return to intelligence work but also to build something from scratch—in effect, the city’s own CIA.

Cohen joined the CIA in 1966 as a 26-year-old economist, a slender young man with a firm jaw and conservative pompadour haircut in the style of a young Ronald Reagan. He left in 2000, having served as the deputy director of operations—America’s top spy. And during those nearly 35 years, the bookish, bespectacled Cohen had been one of the most creative agents at the CIA, with a gift for reshaping bureaucracies toward new ends.

Back in the eighties, he started an analytical team to investigate terrorism, the first of its kind at the agency. Then, in 1996, years before Osama bin Laden entered the public consciousness, Cohen assigned a dozen officers to gather intelligence on him.

Still, many in the CIA regarded Cohen’s tenure at the helm of the spy service as a dark period. From 1995 to 1997, under pressure from a budget-conscious Congress and an uninterested White House, Cohen gutted the CIA’s spy corps and cut loose many of its paid informants. In an unusual move, the New York Times in an editorial called for Cohen’s ouster.

Photo: Sarah Silberg

It didn’t help that Cohen had an abrasive personality and a highly acerbic leadership style. He liked to swear, and, in the words of one longtime colleague, “If he thought you were an idiot, he’d say so.”

But while Cohen could be intimidating and aggressive, he was also prescient. He had been one of the first people in the agency, well before the Berlin Wall came down in 1989, to talk seriously about globalization. Cohen envisioned a world where economies became intertwined, where multinational corporations blurred the political boundaries between nations, and where terrorists and criminals operated across borders.

When he retired in 2000, he left believing that the people overseeing the agency hamstrung it. The White House micromanaged operations, slowing down everything. Lawyers fretted over every policy, signaling the government’s disapproval for covert actions. And Congress used its oversight authority to score political points. The CIA was stuck in the middle, which Cohen felt was an impossible position.

What Kelly offered was a chance to start something new, without bureaucratic hand-wringing or political meddling. Cohen eagerly accepted. Cohen didn’t come alone. To build his new program, Cohen wanted someone by his side with access to the most sensitive intelligence, someone who could play a role in day-to-day operations. With a phone call to Langley, Cohen persuaded CIA director George Tenet to lend him Larry Sanchez. Like Cohen, Sanchez was an analyst who’d come up through the ranks. Unlike Cohen, Sanchez still had a blue CIA badge and the privileges that came with it.

Putting a CIA officer inside a police department was unprecedented. The CIA, by its very charter, was prohibited from having any “police, subpoena, or law enforcement powers or internal security functions.” But 9/11 had changed the equation. Security had become the overriding priority.

To the extent Sanchez had an official title, it was the CIA director’s counter­terrorism liaison to the state of New York. In reality, he was Cohen’s personal CIA representative, with an office at the CIA station in Manhattan and another at NYPD. The agency was footing Sanchez’s salary, but it was not clear to whom he answered, or what his duties were. He’d start many mornings at his CIA office, reading the latest intelligence reports. Then he’d head downtown to give Cohen a personal briefing that was far more expansive than the updates the NYPD was getting officially from the FBI or CIA. While Cohen could be gruff and combative, Sanchez was easy to talk to and easy to like. A former amateur power lifter and boxer, he told great stories about scuba and skydiving—parachuting into Iraq with Army commandos from Delta Force.

Cohen and Sanchez’s appointments represented a major shift in mind-set at the NYPD. Police are trained to uphold the law. By comparison, CIA officers are trained to subvert laws and operate undetected in places where the Constitution doesn’t apply. They are forbidden from doing this in America.

Sanchez and Cohen met at Cohen’s apartment building on the Upper West Side, near Central Park, and hashed out their vision for a new NYPD. The city’s pockets of cloistered Middle Eastern and South Asian neighborhoods were what most worried the two CIA veterans. The 9/11 attacks had been planned in communities walled off from the police by language, religion, and culture. New York was dotted with neighborhoods where someone could rent a cheap room and remain inconspicuous.

Cohen and Sanchez reviewed the dossiers on the 9/11 hijackers and focused in on the life of Mohamed Atta, the ringleader of the hijacking operation. On three continents, people had seen signs of Atta’s growing conservatism, radical ideology, and anti-American vitriol: housemates and roommates, shopkeepers and pub patrons, fellow students and mosquegoers. And two of the 9/11 hijackers had even come to New York and gone completely unnoticed. They traveled the country, conducting surveillance, assembling their team, and training to fly jets. They rented cheap rooms, visited Internet cafés, and joined gyms.

Cohen and Sanchez’s guiding idea was that if the NYPD had its own eyes and ears in the ethnic communities of the five boroughs, maybe things could be different. They needed to be in bookshops to spot the terrorist with his newly grown beard, or in restaurants to overhear friends ranting about America. If detectives infiltrated Muslim student groups, maybe they could identify young men seething with embryonic fanaticism. After all, Atta and his cohorts had been in plain sight, had anyone thought to look.

There was nothing like what Sanchez and Cohen were proposing anywhere in American law enforcement. And of course, the behaviors to be monitored were common not only to the 9/11 hijackers but also to a huge population of innocent people. Most café customers, gym members, college kids, and pub customers were not terrorists. Most devout Muslims weren’t either. To catch the few, the NYPD would spy on the many.

Photo: Sarah Silberg

Sanchez told colleagues that he had borrowed the idea from Israeli methods of controlling the military-occupied West Bank, the swath of land captured from Jordan in the 1967 Six-Day War. But the proposal ignored some important differences between the U.S. and Israel. Brooklyn and Queens, for instance, were not occupied territories or disputed land. There was no security wall being erected in New York City. And, where Muslims are concerned, no one would choose Israel as a model of civil liberties.

Nevertheless, Cohen liked the idea. He compared it to raking an extinguished fire pit. Most coals would be harmless and gray. Rake them carefully, and you might find an ember—a hot spot waiting to catch. This was the genesis of a secret police squad, which came to be called the Demographics Unit. Documents related to this new unit were stamped NYPD SECRET. Even the City Council, Congress, and the White House—the people paying the bills—weren’t told about it.

The NYPD had last been involved in such surveillance activities during the sixties, when there was an NYPD “extremist desk” to watch antiwar groups and a “black desk” to investigate African-Americans. Police maintained hundreds of thousands of case files and more than a million index cards containing names of citizens whose activities were deemed suspicious.

In 1971, civil-rights lawyers sued the NYPD. The plaintiffs represented a grab bag of the New Left, including Black Panthers, gay-rights advocates, and well-known figures like Abbie Hoffman. One young man, Stephen Rohde, sued because when he applied for admission to the New York bar, he was asked whether he’d ever opposed the Vietnam War. It turned out he had once signed a petition in a basement at Columbia University, and his name ended up in a police file.

After contesting the suit for more than a decade, the city settled in 1985 and agreed to new rules known as the Handschu guidelines, named for Barbara Handschu, a lawyer and activist who’d been the first plaintiff. The guidelines stated that police could investigate constitutionally protected activities only when they had specific information that a crime was being committed or was imminent. Undercover officers could be used only when they were essential to a case, not as a way to keep tabs on groups that might be up to no good. Police were prohibited from building dossiers on people or keeping their names in files without specific evidence of crimes.

But the activities that Sanchez and Cohen were proposing would not have been permitted under the Handschu guidelines. So, on September 12, 2002, Cohen filed a 23-page document in federal court asking a judge to throw out the guidelines and give his officers more leeway.

Cohen insisted that the world had changed since Al Qaeda attacked America, and the NYPD needed to change with it. “These changes were not envisioned when the Handschu guidelines were agreed upon,” he wrote, “and their continuation dangerously limits the ability of the NYPD to protect the people it is sworn to serve.”

Cohen painted a frightening picture of a nation—and a city—under siege from enemies within. “They escape detection by blending into American society. They may own homes, live in communities with families, belong to religious or social organizations, and attend educational institutions,” he wrote. “They typically display enormous patience, often waiting years until the components of their plans are perfectly aligned.”

He argued that America’s freedoms of movement, privacy, and association gave terrorists an advantage, one that left U.S. citizens painfully exposed. “The freedom of our society,” Cohen wrote, “has also made it possible for terrorist organizations to maintain U.S.-based activities.”

Inside the NYPD, the document was regarded as a masterwork and the foundation for everything the department would build subsequently. It was part autobiography, part history, and part ideology. One senior NYPD official took to calling it Cohen’s Mein Kampf.

The judge presiding over the Handschu case, Charles Haight, gave Cohen’s words great weight. The original settlement, the judge ruled, “addressed different perils in a different time.” Haight did away with the requirement that the NYPD launch investigations only when it had specific evidence that a crime was being committed. And he eliminated the rule that police could use undercover officers in political investigations only when they were essential.

Most important for the secretly planned Demographics Unit, Haight ruled: “For the purpose of detecting or preventing terrorist activities, the NYPD is authorized to visit any place and attend any event that is open to the public on the same terms and conditions as members of the public generally.”

The only caveat: Police couldn’t document and keep any information from these visits unless it related to potential criminal or terrorist activity.

Photo: Lucas Jackson/Reuters

Haight said his ruling brought the NYPD’s rules in line with the new guidelines Attorney General John Ashcroft had crafted for the FBI. Both sets of rules prohibited authorities from collecting and storing information concerning constitutionally protected activities such as religious and political speech unless related directly to criminal activity.

To accomplish their goals, however, Cohen and Sanchez needed to go far beyond what the FBI could do. They needed to take a broad view of what was related to terrorist activity. As Sanchez would explain to Congress years later: “Part of our mission is to protect New York City citizens from becoming terrorists. The federal government doesn’t have that mission, so automatically, by definition, their threshold is higher,” he said. “So they’re going to have a heck of a lot harder time having to deal with behaviors that run the gamut on First and Fourth Amendment rights and to be able to even look and scrutinize them without having even reached a standard of criminality.”

Far from raising concerns about a police department taking it upon itself to reconsider constitutional rights, Congress enthusiastically embraced Cohen’s views.

The Demographics Unit began simply enough, with a copy of the 2000 U.S. Census. The information was public, and the police used the data the way any sociologist could. They mapped, looking for 28 “ancestries of interest.” Nearly all were Muslim. There were Middle Eastern and South Asian countries such as Pakistan, Iran, Syria, and Egypt. Former Soviet states like Uzbekistan and Chechnya were included because of their large Muslim populations. The last “ancestry” on the list was “American Black Muslim.”

At the NYPD, Cohen enjoyed an advantage he’d never had as a CIA analyst: a pool of recruits drawn from New York’s own neighborhoods. The FBI and CIA struggled to recruit native Arabic speakers, in part because it was prohibitively difficult for applicants with strong overseas ties to get security clearances. The NYPD didn’t have that problem. The police force had long been a stepping-stone to the middle class for immigrants. One in five Academy graduates was born overseas. So when Cohen went searching for officers who could blend in to Muslim neighborhoods, he didn’t have to look far. He recruited young Middle Eastern officers who spoke Arabic, Bengali, Hindi, Punjabi, and Urdu. They would be the ones raking the coals, looking for hot spots, and they became known as “rakers.”

Every day, the rakers set out from the Brooklyn Army Terminal, where the Demographics Unit was based, and visited businesses in teams of two. Their job was to look like any other young men stepping in off the street.

The routine was almost always the same, whether they were visiting a restaurant, deli, barbershop, or travel agency. The two rakers would enter and casually chat with the owner. The first order of business was to determine his ethnicity and that of the patrons. This would determine which file the business would go into. A report on Pakistani locations, for instance, or one on Moroccans. Next, they’d do what the NYPD called “gauging sentiment.” Were the patrons observant Muslims? Did they wear traditionally ethnic clothes, like shalwar kameez? Were the women wearing hijabs?

If the Arabic news channel Al Jazeera was playing on the TV, the police would note it and observe how people were acting. Were they laughing, smiling, or cheering at reports of U.S. casualties in Iraq and Afghanistan? Did they talk Middle Eastern politics? If the business sold extremist literature or CDs, the officers would buy one or two. Was the owner selling fake I.D.’s or untaxed cigarettes? Police would note it. If customers could rent time on a computer, police might pay for a session and look at the computer’s search history. Were people viewing jihadist videos or searching for bomb-making instructions? Who was speaking Urdu?

On their way out, the rakers would look at bulletin boards. Was a rally planned in the neighborhood? The rakers might attend. Was there a cricket league? The rakers might join. If someone advertised a room for rent, the cops would tear off a tab with the address or phone number. It could be a cheap apartment used by a terrorist.

Sanchez carved the city into zones and assigned rakers to visit Muslim businesses in each. They often picked their own targets, with a supervisor sitting in a parked car nearby in case of trouble. Sometimes they were sent to neighborhoods based on world events. If people in a Pakistani barbershop in Queens were enraged over a drone attack that killed civilians, perhaps retaliation was imminent.

About once a week, they filed reports on conversations they’d eavesdropped on. Nobody trained the rakers on what exactly qualified as suspicious, so they reported anything they heard. One Muslim man made it into files even though he praised President Bush’s State of the Union address and said people who criticized the U.S. government didn’t realize how good they had it. Two men of Pakistani ancestry were included for saying the nation’s policies had become increasingly anti-Muslim since 9/11. Muslims who criticized the CIA’s use of drones to launch missiles in Pakistan were documented.

The rakers were in mosques too, listening in on imams and congregants.

“A mosque is different than a church or a temple,” said a former senior NYPD official involved in the effort. “It plays a bigger role in society and its day-to-day activities. They pray five times a day. They’re there all the time. If something bad is going to happen, they’re going to hear about it in the mosques. It’s not as sinister as it sounds. We’re just going into the mosques. We just want to know what they’re saying.”

Sanchez, still on the CIA’s payroll, was the architect of the Demographics Unit, reading the reports and coaching police on how to improve their tactics. Their daily dispatches were compiled into bound color folders that lined the bookshelves in Cohen’s office. Mosques and religious schools were catalogued and hot spots mapped for every precinct.

Surveillance turned out to be habit-forming. Cohen and Sanchez’s efforts also reached beyond the Muslim community. Undercover officers traveled the country, keeping tabs on liberal protest groups like Time’s Up and the Friends of Brad Will. Police infiltrated demonstrations and collected information about antiwar groups and those that marched against police brutality. Detectives monitored activist websites and copied the contents into police files, including one memo in 2008 for Kelly that reported the contents of a website about a group of women organizing a boycott to protest the police shooting of Sean Bell, an unarmed black man killed the morning before his wedding: “This boycott was set for May 11, 2008 (Mother’s Day) there will be NO shopping for cards, flowers, clothing, shoes or dining out. Spend time with Mom at home, serve her dinner, or buy her flowers from a black-owned business. We can be effective if we unite in the name of our children.”

Police collected the phone numbers and e-mail addresses from the website. One was for Agnes Johnson, a longtime activist based in the Bronx. “We were women and mothers who said, ‘We’re going to hold our money in our pocketbooks,’ ” Johnson recalled years later. “That’s all we called for.”

Confirmation that the activities of the Demographics Unit went far beyond what federal agencies were permitted to do was provided by the FBI itself. Once, Sanchez tried to peddle the Demographics reports to the FBI. But when Bureau lawyers in New York learned about the reports, they refused. The Demographics detectives, the FBI concluded, were effectively acting as undercover officers, targeting businesses without cause and collecting information related to politics and religion. Accepting the NYPD’s reports would violate FBI rules.

Cohen told his officers the FBI had its rules and the NYPD had its own. He was no longer constrained by the politicians. The NYPD was governed by the City Council, which had effectively given Kelly carte blanche to run the department as he saw fit.

In the fall of 2005, a senior CIA officer named Margaret Henoch attended a briefing with Sanchez and other NYPD officials. The meeting was a wide-ranging discussion of the NYPD’s new capabilities, including its Demographics Unit.

Henoch had a reputation as a skeptic. During the run-up to the Iraq War, when CIA analysts concluded that Saddam Hussein possessed weapons of mass destruction, they put a lot of stock in statements by an Iraqi defector code-named Curveball. Henoch was one of the agency’s most vocal critics of Curveball’s reliability. She said the agency had fallen in love with its own analysis and hadn’t conducted a dispassionate review. By the time Henoch was proved right, the U.S. was stuck in the quagmire of Iraq.

Sitting with the NYPD, she felt a similar unease. She didn’t see how the Demographics reports could be used to draw conclusions. “I think this is a really impressive collection of what’s where, but I don’t understand how it helps you,” Henoch told the NYPD brass. If it was useful, she figured, maybe the CIA could replicate it. But she didn’t understand how collecting troves of information on local businesses and religious affiliations helped find terrorists.

She asked if there was some success story that summed up the program’s usefulness in its first two years. When she didn’t get an answer, she assumed that the NYPD was being coy with a potential rival. Even in the post-9/11 era, intelligence agencies often jealously guarded their secrets.

“I figured they were just lying to me,” Henoch recalled. It did not occur to her that there might not be any stories to tell.

To Henoch, the project seemed like a huge waste of time, and she was stunned that it was legal. But she figured that the NYPD wouldn’t be doing it if it weren’t.

There were those in the NYPD itself who’d begun to doubt the program’s efficacy. Hector Berdecia was one of those. A sturdily built NYPD lieutenant with a shaved head and broad, boyish smile, Berdecia inherited supervision of the Demographics Unit in 2006 after a yearlong tour in Iraq with the Army.

He’d been in Iraq’s Babylon Province near the lawless area south of Baghdad dubbed the “Triangle of Death.” Berdecia had lived in and around New York all his life, but it was only after his tour that he noticed the many Arabic storefronts dotting New York. In Iraq, he had made Muslim friends and started a Cub Scout troop, using his son’s old troop banner. But 9/11 made him suspicious of his neighbors.

“They were here on 9/11,” Berdecia said. “It was just a matter of time before we got hit again.”

Berdecia got his introduction to the Demographics Unit from one of his sergeants, Timothy Mehta. A burly man of Indian ancestry, Mehta ran through Power­Point slides and reports explaining how it gathered information. Berdecia, who went on to lead a team of rakers, was impressed. As he thumbed through the Demographics reports, looking at shopkeepers identified by name and ethnicity, at restaurants catalogued by the nationality of their clientele, he felt that the city was being made safer by this roster.

Some of the rakers in his unit felt conflicted. They were cops, eager to protect the city. But they also knew they were building files on fellow Muslims—immigrant business owners and members of their communities who’d done nothing wrong.

Berdecia reassured them there was nothing insidious about what they were doing. They weren’t collecting anything that couldn’t be observed by any other member of the public.

“At the very least, we can eliminate this guy from our list if he’s not a terrorist,” Berdecia told his men. “And we can find out who the terrorists are. And that’s your job.”

The truth, though, was that raking didn’t eliminate anybody from a list. It just expanded the NYPD’s files. One Brooklyn business that the NYPD labeled a Bangladeshi hot spot, for instance, was a restaurant named Jhinuk. The list of “alleged activities” included being a “popular location for political activities” and attracting a “devout crowd.”

The Nile Valley Grocery in Brooklyn was noted simply as a “medium-size grocery owned by a person of Syrian descent.” Milestone Park, in Brooklyn’s Bensonhurst neighborhood, was labeled a “location of concern” because it attracted middle-­age Albanian men from the neighborhood: “This location is mostly frequented during the early afternoon hours when Albanians get together for a game of chess, backgammon, or just to have a conversation,” the rakers noted.

For one project, the rakers investigated locations where Arabs and South Asians gathered to play or watch sports. Each location was photographed, the ethnicity of the customers documented. The report on the Naimat Kada restaurant in the Flatiron district noted that people might pray downstairs.

Each location was mapped.

“Arabs in this area frequent this park, especially on Sundays, to play pickup soccer games,” the rakers wrote about Astoria Park.

“Various Arabs frequent this location from nearby Yonkers as well as Manhattan College,” they wrote about Fieldston Billiards in the Bronx.

Berdecia told his detectives they were preventing terrorism.

“I believed it,” he said years later. “I drank the Kool-Aid.”

But as the years went on, Berdecia’s enthusiasm for the program gave way to frustration. As a young detective in the Bronx, Berdecia had worked the streets, building informants and dismantling violent drug gangs. Yet his rakers spent their days sipping tea in cafés.

The Demographics Unit had thousands of dollars to spend on meals and expenses so police would look like ordinary customers—costs known as “cover concealment.” Berdecia felt that his officers could eavesdrop just as well over a $2 cup of coffee as over a $30 meal, and he started asking questions about businesses that kept popping up on expense reports.

One frequent destination was the Kabul Kabob House in Flushing, Queens, which was owned by a soft-spoken blonde Persian woman named Shorah Dorudi, who fled Iran after the revolution in 1979. When Berdecia asked officers whether they suspected a threat that should be reported up the chain of command, he was told they were conducting routine follow-up visits. But a look at the reports showed nothing worth following up.

That’s when Berdecia realized that, in the hunt for terrorists, his detectives gravitated toward the best food.

Occasionally, Berdecia would see receipts for up to $40 at Middle Eastern sweet shops. Sometimes, the receipts showed detectives buying a bunch of pastries just before quitting time.

Because the rakers never received specialized training, their reports contained numerous errors. Sephardic Jews and Lebanese Christians were mistaken for Syrian Muslims.

The reports began looking the same to Berdecia. No matter how detailed, they never matured into criminal cases. If terrorist cells operated in New York, Berdecia wondered, why weren’t the police making arrests? That’s how they’d dismantled drug gangs in the Bronx. Gang members, like terrorists, were secretive, insular, and dangerous. Years earlier, when his son was born, his wife returned from the hospital with a five-person security detail because of threats from gangs Berdecia was investigating.

It nagged Berdecia to see his talented detectives sitting around eating kebabs and buying pastries, hoping to stumble onto something. If it was worth writing up a report, it was worth conducting an investigation. “It irritated me to send a lot of second-grade detectives and first-grade detectives to sit in coffee shops with nothing going on. If we hear something, then let’s do more proactive police work. Let’s run plates. Let’s follow guys.” But as the years passed under Berdecia’s supervision, the Demographics Unit never built a single case. “It was a bunch of bullshit,” Berdecia said.

In September 2009, the National Security Agency intercepted an e-mail from a taxi driver named Najibullah Zazi to an e-mail address linked to one of Al Qaeda’s most senior leaders. The message contained the line “the marriage is ready.”

Marriage and wedding were among Al Qaeda’s favorite code words for attacks, referring to the day that a suicide bomber met his brides, the maidens of the hereafter.

Trying to ascertain the scope of the plot, the NYPD searched the files of the Demographics Unit. Even though the rakers had canvassed Zazi’s neighborhood daily, and had even visited the travel agent where he bought his tickets between New York and Colorado, there was not a single piece of useful information. “There was nothing,” said Berdecia.

On August 9, President Obama, addressing the trove of new information about the NSA’s activities revealed by Edward Snowden, spoke about the need to strike the right balance between privacy and security. “Now, keep in mind that as a senator I expressed a healthy skepticism about these programs,” Obama said. “And as president, I’ve taken steps to make sure that they have strong oversight by all three branches of government and clear safeguards to prevent abuse and protect the rights of the American people. But, given the history of abuse by governments, it’s right to ask questions about surveillance, particularly as technology is reshaping every aspect of our lives.”

Whatever the shortcomings of the Foreign Intelligence Surveillance Act oversight system, at least there is, theoretically, a check on the agency’s activities. But in New York City, for Muslim citizens and activists of many stripes, there is no such outside system meant to safeguard their privacy. The NYPD conducts its oversight in-house. City Hall doesn’t review intelligence programs the way Congress does. Courts can step in to settle questions about constitutionality, but only if somebody finds out about programs that are designed to remain secret forever.

In 2010, the Demographics Unit was renamed the Zone Assessment Unit over fears about how the title would be perceived if it leaked out. But rakers still troll Muslim neighborhoods, filing an average of four new reports every day, searching for hot spots. The Muslim community is marbled with fear, afraid to speak openly because an informant could be lurking near.

Kelly is unapologetic. Like the department’s use of the tactic known as stop-and-frisk, raking is a tactic Kelly maintains is legal. He said the program is operating just as it always has. “Nothing” has changed, Kelly boasted to The Wall Street Journal earlier this year.

In many ways, Ray Kelly has been a remarkably successful commissioner—but when it mattered most, the Demographics Unit was a failure as a matter of police work. And now, the lawyers in the Handschu case have returned to court, arguing that Kelly and Cohen, in their effort to keep the city safe, have crossed constitutional lines. Regardless of the outcome, the NYPD’s programs are likely to join waterboarding, secret prisons, and NSA wiretapping as emblems of post-9/11 America, when security justified many practices that would not have been tolerated before.

Copyright © 2013 by A&G Books, Inc. From the forthcoming book Enemies Within, by Matt Apuzzo and Adam Goldman, to be published by Touchstone, a division of Simon & Schuster, Inc. Printed by permission.