Mayor Bill de Blasio’s comments Friday about NYPD Police Officer Daniel Pantaleo were pure grandstanding.

In the wake of a departmental judge’s ruling that Pantaleo should be fired, the mayor claimed: “For the first time in these long five years, the system of justice is working.” The family of Eric Garner was “told over and over again by” the (previous) Staten Island DA and the federal Justice Department “that the government would do its job — and they waited, and they waited, and they waited, and nothing happened.”

In fact, the DA convened a grand jury that concluded that there wasn’t enough evidence to indict Pantaleo in Garner’s death. The feds reviewed the same record, and reached the same conclusion. Decisions not to prosecute are the justice system working.

And the Garner family was not “failed by this entire process” to date, as de Blasio charged: They received $5.9 million to settle their wrongful-death case. That money won’t bring him back, but neither will Pantaleo’s scalp.

The mayor refused to say outright that he believes Police Commissioner James O’Neill should fire the cop and insisted that he couldn’t say more because “this is an ongoing legal matter.” But his rhetoric made his wishes clear — and the police unions that oppose Pantaleo’s firing know the mayor does not have their backs.

Not to mention de Blasio’s “promise” Wednesday on national TV that “the next 30 days” would bring “justice” in the Garner case. Does anyone think that Rosemarie Maldonado, the NYPD judge, didn’t hear about that before she issued her ruling?

Insiders predict that O’Neill will indeed opt to fire Pantaleo. But Pantaleo was talking Friday of fighting the ruling. And he could decide to sue, arguing that de Blasio’s public pronouncements made it impossible for him to be treated fairly.

As de Blasio’s press secretary pointed out in a tweet last month, Mayor Rudy Giuliani’s remarks in a 1998 case wound up letting two cops stay on the NYPD payroll for three years while they appealed their firing.

For all de Blasio’s blaming of others for the “very long five years, with no sense of closure, no sense of justice” for the Garner family, his posturing could easily mean even more delay.