New York, United States - A US appeals court has reversed a decision over a controversial spy programme run by the New York Police Department (NYPD), enabling a group of Muslim plaintiffs to proceed with their legal challenge.

In 2012, the Muslim Advocates, a national advocacy group, and the New York-based Center for Constitutional Rights filed a lawsuit against what they called the NYPD's unlawful and blanket surveillance of Muslim Americans in New Jersey. The move came after the Associated Press published an expose of the programme in 2011.

The plaintiffs, all Muslims, include an Iraq war veteran, university students, a coalition of mosques, and the principal of a religious school for girls. The Federal District Court in Newark dismissed the case in February 2014, prompting the plaintiffs' attorneys to appeal that decision.

The appellate rulingissued in October held that the New Jersey Muslims have legal standing to sue NYPD's spy programme, which was devised after the September 11, 2001, attacks on the United States in the name of fighting terrorism.

The ruling put the case - Hassan v City of New York - in an historical context back to the 1940s.

"What occurs here in one guise is not new. We have been down similar roads before - Jewish-Americans during the Red Scare, African-Americans during the Civil Rights Movement, and Japanese-Americans during World War II," the ruling said. "We are left to wonder why we cannot see with foresight what we see so clearly with hindsight - that 'loyalty is a matter of the heart and mind, not race, creed, or colour.'"

The appeals court made no conclusion on whether the surveillance subjected the Muslims to discrimination and sent back the case to the district court for further proceedings.

Nevertheless, activists are welcoming the ruling.

"It sends the message that policing in this country just cannot rely on crude stereotype of groups, like the Muslim communities," said Omar Shakir, one of the attorneys on the case.

'Mosque crawlers'

According to documents the plaintiffs filed, the NYPD's surveillance programme, which by its own admission has not yet led to a single conviction, "uses a variety of methods to spy on Muslims", such as pictures, video, and collecting license plate numbers of mosque congregants.

The plaintiffs accused the NYPD of dispatching "undercover officers" - some of whom are called "mosque crawlers" and "rakers" - into mosques, student organisations, businesses, and neighbourhoods that "it believes to be heavily Muslim".

The plaintiffs also claimed the NYPD "has strived to have an informant inside every mosque within a 250-mile [400-kilometre] radius of New York City".

They further alleged the NYPD spied on "at least 20 mosques, 14 restaurants, 11 retail stores, two grade schools, and two Muslim Students Associations, in addition to an untold number of individuals who own, operate, and visit those establishments".

Farhaj Hassan, the lead plaintiff and a US Army reservist, said in an October 13 statement that the ruling "paves the path to holding the NYPD accountable for ripping up the Constitution. Enough is enough".

Neither the NYPD nor the office of Mayor Bill de Blasio responded to requests by Al Jazeera for comment.

Farhaj Hassan and other Muslim residents appealed a court ruling that New York police could legally monitor their activities - and won [Matt Rourke/AP]

Nick Paolucci, a spokesman for the New York City Law Department, said in a statement, "We are reviewing the decision … At this stage, the issue is whether the NYPD in fact surveilled individuals and businesses solely because they are Muslim, something the NYPD has never condoned. Stigmatising a group based on its religion is contrary to our values."

In addition to the Hassan case, two other lawsuits against the NYPD's surveillance tactics are also pending in the federal courts in New York City. They are both in settlement-negotiating phases.

It is not clear when the next hearing of the Hassan case will begin.

"If the NYPD wants to really move forward beyond this dark chapter in history, it is important that it not only reiterate that the programme is not continuing, but that it really ensure its accountability in damages for those who have suffered this policy," said Shakir.

NYPD labels mosques as 'terror groups'

Mapping Muslims

The Associated Press expose, combined with the lawsuits and mounting backlash from Muslim communities, compelled the NYPD to disband the Demographics Unit tasked with mapping the city's Muslims in April 2014.But just a month later, the New York Times reported the NYPD was recruiting arrested Muslims as informants.

The Demographics Unit "was just a small piece of a much broader, discriminatory programme, and there is no indication that has been discontinued", said Faiza Patel, the codirector of the Liberty and National Security Program at the Brennan Center for Justice.

Noa Yachot, a communications strategist for the American Civil Liberties Union, has pointed to other "abusive tactics", such as the use of informants, the designation of entire mosques as "terrorism enterprises", and the discriminatory use of surveillance cameras.

A report released in 2007, which is still available on the NYPD's website, sums up the department's view of terrorism, which sees radicalism permeating every nook and cranny in the city.

Titled Radicalisation in the West: The Homegrown Threat, the report said: "Middle-class families and students appear to provide the most fertile ground for the seeds of radicalisation. A range of socioeconomic and psychological factors have been associated with those who have chosen to radicalise to include the bored and/or frustrated, successful college students, the unemployed, the second and third generation, new immigrants, petty criminals, and prison parolees."

Pamela Geller, a New York-based blogger and anti-Islam activist, has dismissed efforts to end the police spying as "part of a larger attempt to end all law enforcement initiatives aimed at stopping jihad activity … certainly they're jeopardising the safety of New Yorkers".

David Cohen, a CIA veteran installed as the NYPD's first civilian intelligence chief in 2002 to engineer the blanket surveillance programme, argued the only way to gauge the programme's success was through the absence of another terrorism catastrophe on US soil.

"They haven't attacked us," the Associated Press quoted Cohen as saying in a 2005 deposition. He retired in December 2013.

But Charles Strozier, founding director of the Center on Terrorism at John Jay College, dismissed this argument as "the self-serving rationalisation for a haughty and secretive former CIA operative who ran a gratuitous spy programme in New York for years that seriously compromised the rights of a significant minority of our city's citizens".

"Cohen leaves us with a disastrous legacy that the only way to protect ourselves is to compromise our rights," Strozier told Al Jazeera.

Muslims have legal standing to sue the New York Police Department for spying on them