“We’re taught to fear the people meant to protect us,” Mayor Bill de Blasio’s son, Dante, wrote in a rambling op-ed for USA Today recently, recalling a San Francisco police cruiser slowly rolling down the block in his presence. “Because the absolute worst-case scenario has happened too many times.”

In the op-ed, Dante recited the same story that his father, who is running for president, told during the first Democratic debate in Florida. “I have had to have very, very serious talks with my son, Dante, about how to protect himself on the streets of our city,” said de Blasio.

Dante’s bizarre op-ed seemed to accuse law enforcers of murderous racism for nothing more than driving by him. He cited no other evidence for this allegedly murderous intent. His piece was all too typical of the anti-police spirit of our liberal age, however. And Dante’s sentiments are only the tip of the iceberg.

I recently stumbled into a concrete NYPD barrier at the entrance to the Brighton Beach boardwalk. Squiggled in black marker, one of the tags on the barrier reads “Kill Cops.”

The anti-police sentiment is sharply on the rise in New York City. Anti-NYPD activists in the LGBT community have tried to exclude cops from their Pride parade. Other anti-police groups, like Equality Flatbush, take random photos of uniformed officers and post them on social media under the slogan of “No Occupation.”

Of course, cops are people, and some disgrace their NYPD shields. In the 1990s, the Flatbush section of Brooklyn was menaced by an officer named Justin Volpe, whose lawless rampage culminated in the 1997 beating and sexual assault of Abner Louima.

I grew up in Flatbush when Volpe was still in uniform, and I have friends who recall being harassed by him on the streets. But countless more youths were slayed in drug- and gang-related killings in my boyhood neighborhood. They were victims, too. In 1990, the body count reached a staggering figure of 2,245 — the highest on record for homicides in a single year.

Officer Volpe is currently serving a 30-year prison sentence, the city settled with Louima for $8.75 million and my old neighborhood, now called Ditmas Park, has been transformed into one of the safest communities New York City.

We are a long way from subways covered in graffiti, and the homicide rate is at a 40-year low. In fact, we live in the safest big city in America, according to de Blasio, who called last July the safest on record.

This achievement isn’t the work of any one mayor. Nor can it be attributed to any single police tactic or to the overall effects of gentrification. All played a role in a larger, sustained commitment to safety, and there was the public will to see it through. One thing remains reliably true, however: Greater police presence in high-crime areas deters crime.

But as the anti-police rhetoric spikes, so do crime reports, disrupting longstanding positive trends, while the return of fully-tagged trains, a chilling déjà vu of the gritty 1970s, could be a sign of the trouble ahead.

As for the defaced police barrier in Brighton Breach, the NYPD will not likely pursue the vandal. Unlike racist or anti-Semitic graffiti, squiggling “Kill Cops” is not considered a hate crime. Nor is slandering officers in the newspaper, especially when a son of New York political royalty does it.

Steven Volynets is a writer from Brooklyn.