Mayor Bill de Blasio agreed Thursday that the city mental health program his wife runs would join in an event for cops, even if a pro-cop group is involved. But how utterly tragic that it took shaming by The Post and a city councilman, plus the year’s ninth NYPD suicide, to make that happen.

Are his administration’s anti-cop politics really that perverse?

The Post had reported charges by Councilman Joe Borelli (R-SI) that ThriveNYC, the program overseen by first lady Chirlane McCray, pulled out of a seminar for first responders because a pro-cop group, Blue Lives Matter, would be a co-sponsor.

De Blasio denied that, calling The Post and Borelli liars. Yet he, in effect, confirmed the story by citing a sticking point — over whether the event would be “for a limited group of people” or “the general public.” And he blasted Borelli for not calling him to resolve it.

The councilman, for his part, posted emails showing that Thrive staff were originally OK with Blue Lives Matter’s role but balked when they saw the group’s name listed on a flyer. Thrive staff must’ve feared being publicly linked to the pro-cop group.

It’s believable. After all, who’d doubt Hizzoner’s staffers take cues from their boss, who’s often slurred cops as racist and sided with Black Lives Matter, the cop-hating group that inspired its counterpart’s name?

Under de Blasio, hating and disrespecting cops has grown: Consider the recent videos showing derelicts dousing cops with water. In one case, a bucket was actually tossed at a cop while he made an arrest.

Just last Saturday, as The Post reported, onlookers tried to block cops from arresting another suspect in the Bronx.

It was worse in Philadelphia on Wednesday: A gunman in a house there fired madly at cops, hitting six, as bystanders taunted and yelled at police. The US attorney, William McSwain, blamed the crisis on “a stunning disrespect for law enforcement” — championed by the local district attorney, Larry Krasner.

McSwain said he’s fed up with anti-cop behavior; everyone should be: Cops have an incredibly tough job, one that takes a steep toll, as this year’s nine suicides attest. They deserve gratitude. Or at least respect.