The head of the New York City watchdog agency that probes NYPD-on-civilian misconduct has quit in the latest scandal over his use of derogatory language, the mayor’s office announced late Wednesday.

Richard D. Emery, chairman of the Civilian Complaint Review Board and a longtime civil rights lawyer, had been accused of using an offensive term for female anatomy toward a staffer who later sued for discrimination. Emery has said he didn’t use the word in an offensive context and was expressing disappointment about reluctance to punish abusive cops.

advertisement | advertise on newsday

Emery wrote in a statement released by de Blasio’s office that he agreed to quit “after a lengthy substantive discussion with the mayor” about how the controversies “have created daily distractions from the success of the CCRB.”

Earlier this year, Emery had to apologize after roiling police labor unions with comments that the unions were “squealing like a stuck pig.”

Emery, a close friend of NYPD Commissioner William Bratton, was appointed in 2014 and had been a longtime lawyer for litigants suing the NYPD. Board member Deborah N. Archer will be acting chairwoman.

Reacting to Emery’s resignation, PBA president Patrick J. Lynch said in a statement: “Had a police officer made remarks similar to Mr. Emery’s on two occasions, that officer would have been harshly disciplined.” He said he hoped the next CCRB chief would be “a fair-minded and reasonable person who has a basic respect for police officers and the difficult job that they do.”