In this new ruling, the judge placed surveillance of Muslims in the context of a century of broad police surveillance used against Italians, African-Americans and suspected Communists. “It is a historical fact that as the decades passed, one group or another came to be targeted by police surveillance activity,” he wrote.

The judge also cited an August report by the Police Department’s inspector general, which found that investigators had failed to comply with the court-ordered guidelines. It said investigators kept cases open too long and used boilerplate language to justify the use of confidential informers.

When it was released, officials with the department characterized the report as a vindication, saying it proved they had not investigated anyone unlawfully. They described the problems as minor administrative errors and cast it as a clean bill of health.

But Judge Haight said it was evidence of “near-systemic failure.” He chastised the department for highlighting favorable aspects of the report but not addressing repeated problems.

Judge Haight’s involvement in police oversight dates back nearly half a century. A 1971 class-action lawsuit forced the end of the city’s so-called Red Squads and established the intelligence-gathering rules, known as the Handschu Guidelines, named after one of the plaintiffs. The lawsuit has remained active for decades, serving as a check against overreaching by the police. Judge Haight approved the original rules, relaxed them after Sept. 11, and has now called for them to be tightened.

The settlement he rejected would have placed a lawyer inside the Police Department to review intelligence files and report potential wrongdoing to the police commissioner, the mayor or the judge. Judge Haight said that was not enough. He suggested that the lawyer file confidential quarterly reports with the court. He also opposed a provision that would allow the mayor to eliminate the monitor position after five years.

“One cannot foretell what will happen over time in this sensitive and volatile part of life,” the judge wrote, “and it is questionable whether it is fair or reasonable to give the mayor this unfettered veto power.”