Mayor de Blasio followed through Thursday on his promise to drop the city’s appeal of a judge’s ruling that stop-and-frisk is ­unconstitutional.

But he reneged on another campaign pledge — that the federal monitor of the NYPD wouldn’t be around “too long.”

Instead, de Blasio agreed to have the court-appointed watchdog looking over cops’ shoulders for the next three years.

The move was another step toward gutting the work of his predecessor, Mike Bloomberg, who filed the appeal just before leaving office.

“The City of New York will officially drop its appeal to this case,” de Blasio declared at a press conference in Browns­ville, Brooklyn, attended by Public Advocate Letitia James and Brooklyn Borough President Eric Adams.

“This is a defining moment in our history . . . for millions of families, especially those with young men of color,” the mayor said, insisting the changes will make the safest big city in America “safer still.”

Under an agreement with plaintiffs who sued the city and the NYPD for wrongful stops, de Blasio agreed to have the court-appointed monitor in place for three years.

That’s a big jump from when he won the Democratic mayoral primary and declared on WOR Radio, “I don’t expect that situation with the federal monitor is going to go on too long.”

He called the duration a “limited window of oversight” compared to federal monitoring of other police departments.

Bloomberg and former Police Commissioner Ray Kelly objected to having an outside monitor micro-manage the force and potentially handcuff crime-fighting strategies that led to historic crime reductions.

De Blasio said Commissioner Bill Bratton will implement changes to make police searches constitutional and noted that a new inspector general will regularly review policing.

But law-enforcement unions were exploring their own legal options.

“We continue to have serious concerns about how these remedies will impact our members and the ability to do their jobs,” said PBA President Patrick Lynch.

Roy Richter, head of the Captains Endowment Association, added, “We have expected this action from the mayor and are waiting for a decision from the courts that determines our ability to continue the appeal. If the court rules in our favor, we will re-evaluate our position and the appropriate manner in which to proceed given the city’s withdrawal.”