Whether federal Judge Charles Haight recommended significant changes or merely tweaked a recent settlement limiting NYPD spying of Muslims, one thing is clear: He doesn’t trust the department.

The NYPD line is that Haight bought the argument by NYPD Inspector General Philip Eure that the department failed to follow guidelines in closing some of surveillance cases. But Haight has distrusted the NYPD for more than a decade — ever since then-Commissioner Ray Kelly and his spymaster, David Cohen, misled him into easing longtime department guidelines.

In February 2003, a year and a half after 9/ll, Haight accepted Cohen’s argument that a “criminal predicate” was no longer needed to monitor or infiltrate Muslim organizations. Haight agreed with Cohen that the guidelines hampered NYPD surveillance of mosques Cohen said were frequented by terrorists.

Within six months, Haight realized he’d made a mistake and restored the rules. By then, it was too late. Kelly said Haight’s ruling would “not change any modification [of the guidelines] made by the judge.” With Mayor Michael Bloomberg turning a blind eye, Kelly and Cohen turned the NYPD Intelligence Division into a mini-CIA.

When a small plane piloted by Yankees pitcher Cory Lidle crashed on the Upper East Side in 2006, the NYPD told undercover agents and informants in some mosques and Islamic centers to gauge reaction in search of a terrorism link. At the Masjid At-Taqwa Mosque in Brooklyn, an informant said a congregant seemed upset by the crash. Police moved to get a record of his phone calls.

In 2008, the NYPD began spying on the small Somali community in Buffalo — despite the NYPD liaison in western New York saying he was unaware of crime trends attributed to Somalis.

In 2011, NYPD Confidential published an Intelligence Division document that revealed the NYPD had targeted Muslims in NYC. It had used undercover agents or informants in 250 mosques, 12 Islamic schools, 31 Muslim student associations and 263 “ethnic hot spots,” such as businesses. It labeled 138 Muslims “persons of interest.”

As Haight put it in rejecting the settlement, the NYPD has shown a “systemic inclination” to ignore rules and is “accustomed to disregarding” court orders.