Mr. Dietl also said he had saved countless women as a police officer and had helped dozens more as an investigator. It would be unfair to focus on a few cases in a 32-year career, he said.

Still, critics described Mr. Dietl’s conduct as troubling.

“It is a disgusting way to defend a lawsuit,” said Nancy Erika Smith, Ms. Carlson’s lawyer. “It is disgusting for Fox. It is disgusting for Bo Dietl. It is just another way to attack women, and I think women are pretty sick of it.”

The revelations could further complicate a campaign already hampered by a self-inflicted wound: Mr. Dietl did not correctly file party registration documents, forcing him to run as an independent. Mayor Bill de Blasio, a Democrat, is seeking re-election, and the top Republican challengers are Assemblywoman Nicole Malliotakis and the real estate sales executive Paul J. Massey Jr.

As a candidate, Mr. Dietl has made a racially charged comment involving the mayor’s wife, sent an obscenity-laced text to the chairman of the Reform Party on Staten Island and been criticized for failing to pay $477,000 in state taxes, among other issues.

Mr. Dietl’s record as an investigator has not been closely scrutinized, however. A review by The New York Times of some of his high-profile cases provides insight into Mr. Dietl and his investigations, including work done for members of the Trump administration and, according to Mr. Dietl, Donald J. Trump.

In the one case in which he worked directly for Mr. Trump, Mr. Dietl said, someone was causing “trouble” for a Trump casino in Atlantic City. Mr. Dietl, who did not describe the trouble, said he had called the man and threatened to release compromising information about him if the problem did not go away. The problem went away, he said.