“Policing is dead,” a member of the NYPD told me Monday, after NYPD Commissioner James O’Neill decided to fire Officer Daniel Pantaleo over the death of Eric Garner. “Morale was already low. This was just the nail in the coffin.”

Another member of the department told me on the condition of anonymity, “It’s just disheartening.”

“It’s hard to say whether cops will back off,” he continued, “but I think the writing is definitely on the wall. Based on how things went in other cities [Chicago and Baltimore] I wouldn’t be surprised if we went in that same direction.”

The reactions echoed that of Police Benevolent Association President Pat Lynch, who told reporters, “The job has been dying; and today, the job is dead.” Lynch went on to assert Pantaleo’s dismissal was based “on the politics.”

As is often the case with these things, context and timing are all-important. The decision to fire Pantaleo will not be perceived in a vacuum, but rather through the lens of these politically charged times.

The decision came in the middle of a presidential-election cycle in which nearly all the candidates pursuing the Democratic Party’s nomination have openly demonized police as cogs in a machine of racial oppression and injustice.

Indeed, just a couple of weeks ago, protesters interrupted a prime-time debate to demand that candidate (and, when he has time, New York City Mayor) Bill de Blasio fire Pantaleo. The political implications of the decision were not lost on the officers I spoke to, one of whom referred to Pantaleo as “the victim of a presidential run.”

Unfortunately, Pantaleo’s firing also came in the wake of a series of escalating instances of NYPD officers being taunted, threatened and assaulted while in the field.

Not long after two videos of cops being doused with water went viral, another video showed cops being swarmed by a crowd in The Bronx. That melee resulted in one cop being hit with an open container of Chinese takeout; and in yet another incident reported by The Post over the weekend, officers in Brooklyn were hit with “ ‘air mail’ objects thrown down at cops from rooftops.”

Police morale shouldn’t dictate the outcome of investigations properly within the purview of a police department’s oversight mechanisms. But neither should such decisions be colored by the politics of our moment.

The pursuit of justice does not require sending police the message that their presence is not appreciated or wanted in Gotham’s high-crime neighborhoods. Will politicians stop doing precisely that?

Rafael A. Mangual is a fellow and deputy director of legal policy at the Manhattan Institute for Policy Research, and a contributing editor at City Journal.