The New York City Law Department has successfully defended an embattled police detective in multiple civil rights suits, but in a separate case that same department is now being asked to defend the city from a suit filed by the detective, who alleges that city leaders failed to protect him from “frivolous” lawsuits.

Since joining the force in 2002, Det. David Terrell has been the target of more than 20 lawsuits that include allegations of police brutality, false arrest and other misconduct, but nine of the cases, including four since the beginning of August, have been thrown out for various reasons.