Lawyers in charge of monitoring the NYPD's Muslim surveillance operation filed a motion arguing the department violated key rules. They asked a federal judge to order the NYPD to stop spying on Muslims and to purge police records of private conversations that had nothing to do with crime or terrorism.

The New York Police Department's Muslim surveillance operation, set up under the direction of an ex-CIA operative, deployed undercover officers and informants in mosques, schools, restaurants, and bodegas throughout the city to spy on the daily lives of thousands of Americans.

Reams of information about innocuous activity landed in police files. Unsurprisingly, these indiscriminate operations have proven ineffective. NYPD Intelligence Chief Thomas Galati made no bones about the fact that a key part of the program never turned up a lead worth pursuing.

After the Associated Press revealed that the NYPD had placed entire American Muslim neighborhoods under surveillance, police commissioner Raymond Kelly vigorously defended the program.

The police acted in accordance with rigorous court-ordered rules, known as the Handschu Guidelines, he claimed. But that defense isn't holding up well. The very lawyers charged with monitoring enforcement of the Handschu Guidelines filed a motion arguing that the department had violated key rules. They asked a federal judge to order the NYPD to stop spying on Muslims and to purge police records of private conversations that had nothing to do with crime or terrorism.

That wasn't all. Given the NYPD's persistent failure to abide by the guidelines, the Handschu lawyers also asked the court to appoint an independent monitor. They were right to do so.

The Muslim surveillance program is only the latest in a series of NYPD intelligence operations run amok. From 1909 to the 1980s, the Department created files on more than 1.2 million New Yorkers and shared them with private investigators, university administrators, prospective employers and professional associations like the New York Bar Association.

In the run-up to the 2004 Republican National Convention in New York, undercover officers fanned out across 15 US cities and abroad to spy on people planning to protest the convention. The Occupy Wall Street movement came under intense police scrutiny as officers interrogated protesters and visited the homes of organizers.

The Handschu Guidelines, which, in theory, regulate these operations, were developed in the 1980s as part of the settlement of a class action lawsuit by political groups that claimed that they had been spied upon and infiltrated by the NYPD. Although modified after 9/11 to give the department greater flexibility, they continue to impose vital checks on the department's ability to investigate political activity and record it in their files.

"the concentration on things Muslim arises out of the prejudice that the NYPD has brought to its program: the NYPD supposes that because an organization is connected to Islam, therefore it is suspect."

Not only is this approach unconstitutional, it also flies in the face of government and academic studies showing that one cannot predict who will become a terrorist based on how religious they are.

Commissioner Kelly also defended the Muslim surveillance program on the grounds that the Handschu Guidelines authorize the NYPD to "visit any place and attend any event that is open to the public". But the guidelines require the police to review the information collected from these visits and purge those parts that do not relate to suspected criminal or terrorist activity.

This compromise was reached to take account of the interest of the NYPD in monitoring lawful activity that might be related to terrorism and at the same time ensure that the police did not trample on First Amendment rights by keeping dossiers on law-abiding New Yorkers.

As the Chief Galati freely admitted, the NYPD has made no effort to comply with this requirement. It has no policies or procedures to review or remove information.

Instead, the police take the position that everything that Muslims say or do is – or at least potentially could be – relevant to some hypothetical future terrorist attack or crime. So the NYPD continues to maintain thousands of records containing the conversations, whereabouts and personal details of law-abiding Americans.

Past surveillance scandals illustrate the dangers of keeping such files, particularly during moments of perceived national security crisis. Secret dossiers have been used to begin unjustified investigations into political activity. In 2008, for example, Maryland state police used its dossiers on activists to open a file on Amnesty International for the possible "crime" of "civil rights". Information about people's personal lives was used to blackmail and pressure innocent Americans, most famously, Martin Luther King, Jr., whose views were unpopular with law enforcement.

The NYPD's pattern of failing to comply with the law is facilitated by a chronic lack of oversight. The police operate largely unchecked, with no day-to-day independent oversight.

As the Handschu filing shows, it is difficult for a court to oversee the department's actions without an independent monitor. The violations of agreed-upon rules went on for years and only came to light through the work of investigative reporters. Indeed, the Handschu lawyers' request for an independent monitor echoes what the Brennan Center for Justice and other civil society groups have long called for: an inspector general for the NYPD.

An inspector general would have the powers and resources to review the legality of the department's policies and operations on an ongoing basis. That way we won't have to wait for a scandal and enterprising reporters to make sure the police are complying with the law.