It was called the Demographics unit, which in a way it was, semantically at least. But it was the way it gathered 'data' on the Muslim community in and around New York that upset many people once its existence was revealed. What the unit actually did was spy on Muslims. And by spying, it wasn't just your run of the mill keeping an eye of a couple of suspicious characters. It was sending plain clothes detectives into every Muslim neighbourhood to record where people ate, to see what movies they went to, to chat up store owners to see how they felt about America and Islam, to troll websites to find Muslims students and record what classes they took and what they wrote on their social media pages, to take down the license plate numbers of everyone who went to a mosque. They spied on over 250 mosques and student groups. It was spying on a grand level. But there is a new administration in New York. Former Mayor Michael Bloomberg, who strongly supported the programme is gone. And new mayor Bill de Blasio does not support it. So on Tuesday, New York City's police intelligence chief told representatives of the Muslim community that the city no longer needed to collect information in such a secretive manner and that the police department was disbanding the unit. A spokesman for the NYPD later confirmed to the media that the unit had indeed been shut down and its officers reassigned. De Blasio said in a statement earlier in April that the action was "a critical step forward in easing tensions between the police and the communities they serve, so that our cops and our citizens can help one another go after the real bad guys". Since the existence of the unit was revealed by the Associated Press in 2011, criticism of the unit has grown. Later renamed the 'Zone Assessment Unit, it was started by former New York police commissioner Ray Kelly, with the help of a former CIA senior officer named David Cohen, and based on surveillance tactics used by the Israeli military in the occupied West Bank. The unit's activities were kept secret from the New York City Council, Congress and even the White House. Based in the Brooklyn Army Terminal, this quote from New York Magazine showed how members of the unit, known as 'rakers' operated when they visited any place of business. "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, likeshalwar kameez? Were the women wearing hijabs?" Leaders of the Muslim community in New York said the programme drove a wedge between it and law enforcement officials. "The Demographics Unit created psychological warfare in our community," said Linda Sarsour, of the Arab American Association of New York. "Those documents, they showed where we live. That's the cafe where I eat. That's where I pray. That's where I buy my groceries. They were able to see their entire lives on those maps. And it completely messed with the psyche of the community." The Demographics Unit was not only controversial for the civil rights questions it raised, there were also questions about how effective it was. In 2012 the NYPD acknowledged that the programme, which had then been running for nine years, has not generated a single lead about terrorism or any terrorist suspects. Not everyone applauded Tuesday's announcement. Republican Representative Peter King, long known for his harsh views of Islam, said it was a mistake, and that he believes the Muslim community still poses a major terror threat to New York City. "The reality is the terrorist threat is coming from the Muslim community, and however it is defined, it has to be monitored," King told local media. Most people, however, saw the unit's mission as a failure. "Ultimately, the unit's most significant accomplishment was the alienation of Muslim-Americans who should have been able to count on police for protection, but instead were targeted for persecution," the New Jersey Star-Ledger wrote in an editorial on its nj.com website.