A federal judge in New Jersey dismissed a lawsuit last week brought by New Jersey Muslims who claim that the NYPD investigated and surveilled them based on little more than their Muslim faith. The plaintiffs in Hassan v. City of New York have good reason to believe they were the targets of unconstitutional discrimination — for years, New York's Muslims have known that they were subject to heightened police scrutiny because of their religion.

Among other things, the NYPD has installed police cameras outside mosques, recording congregants as they come and go, and it has dispatched informants and plainclothes officers to Muslim places of worship, organizational meetings, and social gatherings to ask unwarranted and unwanted questions. In a Pulitzer prize-winning exposé based on the NYPD's own documents, the Associated Press in 2011 confirmed the NYPD's discriminatory use of these techniques and more. Despite all this, the judge's decision denied the New Jersey plaintiffs any opportunity to prove their claims in court. Counsel in the Hassan case have indicated they will appeal.

The Hassan decision is troubling for many reasons, including the fact that the court blamed plaintiffs' injuries on the AP disclosures, rather than the NYPD's conduct. Another aspect of the decision is particularly disturbing and needs emphasis: the court's basic misunderstanding of what it means when law enforcement discriminates. The court concluded that the plaintiffs' claims of discrimination weren't "plausible" because it accepted, virtually without question, the NYPD's argument that the police sought to prevent terrorism. That conclusion, of course, completely ignores how the NYPD pursued this goal.

The Hassan lawsuit — and the ACLU's own ongoing case on behalf of New York Muslims — challenge an NYPD policy and practice of religious profiling. Both we and the lawyers in Hassan argue that the NYPD deliberately and wrongly used religion as a proxy for criminal suspicion. In short, our argument is that the NYPD violated the Constitution's guarantee of equal protection by going out and looking only for Muslims, rather than directing its spying at would-be terrorists.

By focusing on the NYPD's professed goal, rather than its core method, the New Jersey court embraced a dangerously narrow view of discrimination — one rightly rejected by other courts. The ruling suggests that the Constitution only forbids discrimination if it is based on the kind of deep and explicit prejudice or hostility that one might associate historically with anti-miscegenation laws, school segregation, or the denial of voting rights.

But discrimination isn't necessarily about malice, or even dislike. (Though when we're talking about the Muslim surveillance program, both are present: the NYPD's Radicalization Report , which provides a framework for its program, is based on crude, prejudicial, and false stereotypes .) A government decision need not be motivated by ill will in order to run afoul of the Constitution. When it comes to discrimination, the correct test is simply whether a police policy or practice targets individuals based on their race, religion, or any other constitutionally-protected status — regardless of whether that discrimination was part of law enforcement's original goal.

The NYPD's discredited stop-and-frisk policy is a prime example of this phenomenon of discrimination permeating an entire law enforcement process — a process that may have legitimate ends in mind. Under this policy, the NYPD disproportionately and discriminatorily targeted blacks and Hispanics for heightened police scrutiny. In her opinion ruling the policy unconstitutional, Judge Shira Scheindlin distinguished between the NYPD's ends and means, acknowledging that while the goal of deterring crime is laudable, the NYPD's process — targeting communities on the basis of race — violated bedrock equal protection principles.

The NYPD's Muslim surveillance program is no different. Even if the NYPD argues that it was motivated by a legitimate interest in thwarting terrorism, its use of religion as a proxy for criminal suspicion is unquestionably discriminatory. (Not to mention ineffective .) This type of discrimination is just as pernicious as any other. In the case of New York Muslims, the NYPD has cast a badge of suspicion on entire communities, causing profound harm to their religious goals, speech, and practice. By sowing anxiety, fear, and distrust, the NYPD has damaged the social fabric both of these Muslim communities and of the nation's most diverse city.