Nearly 30 years ago, the federal courts had to place limits on New York City police surveillance to protect law-abiding citizens who happened to be politically engaged on civil rights and other issues. Based on new court filings in a longstanding suit challenging police surveillance techniques, the courts may need to intervene to stop the New York Police Department from spying on law-abiding citizens once again, this time Muslims.

The city’s police came under court scrutiny starting in 1971 for what civil rights lawyers described as illegal surveillance by the department’s infamous Red Squad, including its surveillance of Black Panthers who were acquitted on charges of conspiring to blow up police stations and department stores. The case, named for a plaintiff, Barbara Handschu, became a class action, spreading to other politically active groups, and was settled in 1985. The city agreed to follow court-ordered investigation guidelines that were loosened after Sept. 11 to ensure that the police had ample flexibility to ferret out terrorist threats.

The revised agreement allowed police officers to attend political and religious events, but barred them from retaining information unless it was related to potential terrorist acts or other unlawful activity. The restrictions had two purposes: to prevent the department from unfairly targeting entire political or religious groups, and to make sure that records were kept only when the police found “reasonable indications” of potential law breaking, not as an intrusion into the private affairs of innocent citizens.

A motion filed in federal court last week by the lawyers in the Handschu case makes a strong case that the city has simply ignored those guidelines in its antiterrorism fight and is targeting Muslim groups because of their religious affiliation, not because they present any risk.