A federal judge’s rejection last week of a settlement between civil rights groups and the New York Police Department could have a far-reaching impact on the NYPD’s ability to surveil and infiltrate minority and protest groups. The settlement, which would have restricted the NYPD from using race, ethnicity, or religion as justification for its operations, as well as placing a higher burden on officers to demonstrate suspected unlawful activity, was the result of two separate lawsuits that alleged that the NYPD had been illegally infiltrating groups without credible intelligence. But even the judge didn’t think it went far enough. Citing “near systemic failures” in the NYPD’s ability to follow court orders in the past, Judge Charles S. Haight Jr. asked the plaintiffs, which included the New York Civil Liberties Union as well as Muslim groups who were illegally spied on and infiltrated by a special NYPD unit from 2003 to 2014, and the city to come up with a new, stronger agreement, one that provides even more independent monitoring of the police department’s surveillance operations — reversing a fifteen-year-old precedent Haight himself put into place.

In the original proposal, a civilian monitor would have been able to give input to the NYPD’s surveillance operations, but that neutral party could only inform the court if there were systemic violations of the Handschu guidelines, the set of court-mandated rules that govern the NYPD’s spying conduct. In sending all parties back to the negotiating table, Haight stated that such a high threshold gave the police too much latitude. Writing that the NYPD has displayed “a systemic inclination on the part of the Intelligence Bureau to disregard the Guidelines mandate,” the judge proposed that the City Hall–appointed civilian observer should be allowed to go straight to the judge with any violations, as well as be required to file quarterly reports that aggregated all oversteps.

“We think that the reforms proposed by the judge are beneficial to the community, beneficial to the Muslim community, and we are hopeful that the police department will share our view and sit down and talk to us about these suggestions,” Arthur Eisenberg, legal director of the NYCLU, told the Voice.

The NYPD’s use of surveillance and infiltration has been under court supervision since the 1970s, when the department’s infiltration of political groups, from the Black Panther Party to educational-reform advocates, resulted in a class-action lawsuit whose outcome was the Handschu agreements: a set of guidelines that dictated when and how the NYPD could conduct surveillance and the amount of evidence it would need to begin an undercover operation.

Since then, the class action has been reopened at least three times, with either the NYPD or civil rights advocates asking the judge to weaken or strengthen the guidelines, respectively. In one case, just after 9-11, the NYPD asked Judge Haight, who has presided over the Handschu agreement for the past forty years — well into semi-retirement — to eliminate several provisions that civil rights advocates deemed necessary, including the need for a civilian monitor. Haight agreed, and the NYPD’s spying was allowed to run amok.

In fact, the rejected settlement combined the ongoing Handschu case with an entirely different lawsuit against the city, accusing the NYPD of infiltrating student groups and mosques on the suspicion of terrorist activity. Several NYPD officers went undercover in their surveillance activities; in one case an officer went so far as to pose as a student to gain access to Brooklyn College’s Muslim Student Association. The resulting lawsuit, Raza v. City of New York, charged that the NYPD had been violating civil rights, alleging that the department had been profiling the groups based on religion, and that police were openly flouting the Handschu guidelines.

Since 2013, when Raza was filed, the subjects of NYPD spying have changed drastically. Protests have begun to focus more on the police themselves in the midst of the Black Lives Matter movement, and the NYPD has taken a personal stake in trying to identify “professional agitators” and getting undercover officers to follow and infiltrate protest groups. The rejected settlement would have cut back on the NYPD’s use of undercover and confidential informants. However, the judge asked that those sections of the settlement remain intact, leading to a change in how the NYPD will surveil not only Muslim communities, but other groups as well.

“The proposed settlement applies broadly, because it’s not limited just to the surveillance of Muslims. It would apply to every political group,” said Eisenberg, referring to the sections of the rejected agreement he believes will remain intact through renewed negotiations. “In the new guidelines, there is a presumption against the use of confidential informants and undercover agents. If ultimately adopted, there will be new protective standards with respect to these practices for all groups dealing with the NYPD.”

But whether the NYPD will follow the new, stronger guidelines is contingent on whether they’ll accept a stronger, more substantive role for the independent member of the Handschu committee. So far, the NYPD, as well as City Hall, has remained steadfastly opposed to the idea of outside monitors of the police department. City Hall has repeatedly berated the City Council–installed Inspector General, a report of whose Judge Haight cited repeatedly in justifying stricter monitoring of the NYPD. Earlier this year, Mayor de Blasio sidelined a raft of reforms that would have brought even more independent oversight to the NYPD, arguing that the department could continue to police itself. Apparently Judge Haight was unconvinced of this.

In a statement to the Voice, the city law department said that while it was disappointed by the judge’s rejection, it would “explore ways to address the concerns raised.” For the sake of any targets of NYPD spying citywide, here’s hoping for a speedy reconciliation.