Michael Palladino, head of the detectives union, warns his officers not to let down their guard in the face of heated criticism over aggressive policing and the "chokehold" death of Eric Garner. View Full Caption DNAinfo/Sonja Sharp

NEW YORK CITY — The president of the city’s detectives’ union believes recent attacks on police officers stem from escalating anti-NYPD criticism over stop-and-frisk and the “chokehold” death of Eric Garner — and warned his members to avoid becoming “a punching bag” for criminal suspects.

In a carefully crafted memo to the city’s 5,000 investigators, Michael Palladino, president of the Detectives Endowment Association, reminded officers “to be cautious in all of your encounters and never let your guard down.”

Referring to an "unexpected and unprovoked" attack in East Harlem that left a female officer with a row of broken teeth and a weekend incident in Times Square where a panhandler dressed as “Spider Man” struck an officer, Palladino wrote: “You are not a punching bag."

"Protect each other and defend yourself if you must as you lawfully enforce the law,” he said.

He went on to say he believes these “assaults were partly the result of criminals feeling encouraged by the public debate against stop-and frisk, coupled with reaction to (Garner’s) ‘death in custody,’" which received “extensive negative media coverage aimed at the NYPD."

In the Garner case, an NYPD officer can be seen in a video putting his arm around 6-foot-3, 280-pound Garner, who was resisting arrest, in what appeared to be a chokehold. The move is prohibited by the NYPD.

The officer was placed on modified assignment, stripped of his guns and badge, and Staten Island District Attorney Dan Donovan is probing the incident.

Other videotaped arrests depicting officers allegedly abusing suspects during arrests quickly surfaced, including one in which an officer seemingly kicks a man in the head.

“When you are taking police action, expect the cameras to be rolling, because every cell phone is equipped with a video and audio recording device,” Palladino said.

The email was sent Wednesday afternoon at around the time Detective Mario Muniz, who was wounded in a Greenwich Village shootout with a fugitive child molester, was released from Bellevue Hospital.

But that incident was not the impetus behind the missive, which was prepared before Muniz and two U.S. Marshals were wounded trying to arrest Charles Mozdir, who was wanted for child abuse in southern California.

“Your job is a dangerous one,” Palladino concluded. “My concern is simple: the safety of our detectives.”

Immediately after Garner's death, Patrick Lynch, president of the city's police officers union, asked the public to keep an open mind pending the outcome of the Medical Examiner's inquiry and the DA's probe.

Garner suffered from asthma and other medical ailments that may have contributed to his death, officials said.

Mayor Bill de Blasio, shortly after returning from a family vacation in Italy, joined the chorus of critics expressing concern over Garner's death.

Standing on Monday with Commissioner Bill Bratton at a City Hall press conference, he reiterated that the entire NYPD force of 35,000 officers will receive revamped training on how to arrest suspects.