Mayor Bill de Blasio said “justice was done” with the firing of Police Officer Daniel Pantaleo for the death of Eric Garner — and insisted that rank-and-file cops won’t revolt over his ouster.

“There was a fair and impartial process and justice was done,” de Blasio said at a City Hall press conference Monday, about an hour after NYPD Commissioner James O’Neill announced his decision to terminate Pantaleo for Garner’s 2014 death in Staten Island.

“I hope it brings some small measure of closure and peace to the Garner family,” de Blasio said.

The mayor said he was confident that police officers would reject calls by police union heads for a work slowdown to protest Pantaleo’s ouster

“An hour from now a New Yorker will be in danger and I guarantee you our officers will do what they swore that oath to do because that’s who they are,” de Blasio said.

“The people of this city will not accept any work slowdowns by any means from public servants,” he added.

De Blasio said the department has changed since Garner’s death.

“The NYPD of today is a different institution than it was just a few years ago,” citing retraining police officers in de-escalation tactics, implicit bias training and the use of body cameras.

The mayor also insisted that the decision to ax Pantaleo rested solely with O’Neill. “This was the police commissioner’s decision.” But, he said, “We talked about the timing and how to prepare the city in any event of any specific decision.”