And then Team de Blasio doubled down, spending a pile of political capital arguing that Bratton, a principal architect of aggressive, broken-windows policing, is indeed the right man to replace Raymond Kelly — the man who refined the controversial technique to a public-policy art form.

Soon even Al Sharpton was on board — grumpily, to be sure, but on board nevertheless. “Bratton and I may have had our disagreements in the past, but we also have had shared interests in keeping our streets safe,” The Rev wrote over the weekend.

Preliminary verdict? This was a gutsy selection, artfully executed, and to the city’s benefit.

Still, questions linger.

Leaving aside for now the most pressing of these — can Al Sharpton really be trusted in such matters? — Bratton will be joining a battle very much in progress come Jan. 1.

One with the outcome very much in doubt.

For de Blasio’s decision to accept a federal judge’s deeply flawed finding that the NYPD’s aggressive anti-crime tactics are racist — and therefore illegitimate — is going to be a huge problem for the new commissioner.

US District Court Judge Shira Scheindlin’s courtroom conduct was so egregious that a federal appeals panel simply removed her from the case — but without, alas, also vacating her verdict. This effectively put the NYPD into federal receivership.

Absent an appeal, a lawyer Scheindlin appointed — and the “advisory” panel she named to help him with the details — soon will be calling the public-safety shots in New York City.

And de Blasio has said there will be no appeal.

Fine. New mayor. New broom. A clean sweepdown fore and aft. What could be more American than that?

But let’s also be clear on this point: There will be consequences.

The Scheindlin ruling is an explicit repudiation of policing practices largely invented by Bratton and colleagues more than 20 years ago — which became the foundation for the transformation of New York City from Dodge City to . . . well, if not Mayberry RFD, then close enough.

The policy is simplicity itself: Send cops to where the crime is, and keep them there until the streets are as safe as they reasonably can be.

The details, of course, aren’t simple at all. Such an approach requires iron discipline, clear command authority and full accountability.

Not to rehearse the obvious, but this worked — not only for Bratton during his first tenure at One Police Plaza two decades ago, but for his successors right up through Ray Kelly.

Yet aggressive policing is not friction-free, especially since violent street crime is almost exclusively a black and Hispanic phenomenon in New York. So New York’s policies have acquired critics — Scheindlin and a strong majority on the expiring City Council among them. And Al Sharpton, too.

Scheindlin’s insistence on outside oversight of the department is nothing if not an explicit effort to disrupt the NYPD’s chain of command. As is the council’s somewhat less focused insistence on an inspector general. Both say their concern is alleged “racial profiling,” but actions speak for themselves: They just want cops to go away.

Sharpton’s presence signifies something a little more nuanced.

Once principally a self-interested bomb-thrower, through audacious persistence Sharpton has matured into a (still principally self-interested) presence in the community.

This was underscored over the weekend, when de Blasio paraded Bratton before Sharpton and a clearly skeptical congregation in Harlem.

Not to read minds, but de Blasio was there because he has a constituency to service; Bratton, because it was necessary if he’s to get a job he covets — and Sharpton because it’s good to be the kingmaker.

By withholding support from Billy Thompson, the black candidate in last fall’s Democratic primary, Sharpton made it OK for African-Americans to vote for a white guy — which they did in astonishing numbers.

Now Sharpton — always a player, but usually on the periphery — has a place at the table.

History instructs that Al Sharpton’s imprimatur is a negotiable instrument. If that’s still the case, then the relevant question isn’t so much whether Bill Bratton is the right guy for the job as it is whether the job is right for Bill Bratton.