A federal judge has approved a settlement that puts a civilian watchdog on the NYPD panel charged with protecting Muslims from unconstitutional surveillance, court documents show.

Judge Charles Haight signed the plan Monday that would have a lawyer sitting on the committee that watches over NYPD counterterrorism surveillance.

The civilian representative will be able to communicate his or her concerns about police investigations directly to the judge.

The member will be appointed by the mayor and required to attend the panel’s meetings. He or she can only be removed with a judge’s approval.

“We are pleased the court accepted the revised settlement,” said Lawrence Byrne, NYPD deputy commissioner of legal matters, while insisting that the NYPD didn’t do anything wrong in past counterterrorism investigations.

The settlement resolves lawsuits that alleged the NYPD spied unconstitutionally on Muslims in the wake of the Sept. 11, 2001, attacks.