A federal judge rejected a settlement in two lawsuits that accused the NYPD of unlawfully spying on Muslims – until lawyers tweak the terms to give an appointed watchdog greater oversight.

In a decision made public Monday, Manhattan federal court Judge Charles Haight called for changes to be made in the settlement reached in January, in which the city agreed to appoint a civilian representative to monitor a committee that oversees intelligence investigations.

The pair of lawsuits, filed in Brooklyn and Manhattan federal courts, accused the NYPD of “religious profiling” of Muslim leaders and at mosques post-9/11.

Haight wants the appointed representative’s role strengthened, saying the NYPD had a “systemic inclination” to flout court orders.

“The proposed role and powers of the civilian representative do not furnish sufficient protection from potential violations of the constitutional rights of those law-abiding Muslims and believers in Islam who live, move and have their being in this city,” Haight wrote.

Click for more from the New York Post.