The repeated exoneration of allegedly racist cops by minority jurors and judges — from Ferguson and Staten Island to Cleveland and now Baltimore — seriously undermines the anti-cop movement started by Black Lives Matter and fueled by President Obama.

With half the Baltimore cops now acquitted in the death of Freddie Gray, a pattern has emerged where highly publicized cases against cops for racially motivated murder of black suspects have crumbled under the weight of court evidence.

It’s not to say these police officers made no procedural errors in their use of force, but they certainly did not commit the heinous civil-rights crimes the BLM movement accused them of committing. Even so, the movement continues to inspire fury against cops.

Baltimore police Lt. Brian Rice: A black judge Monday cleared the highest-ranking cop of manslaughter and other charges involved in the arrest of Gray, whose death while in police custody triggered days of anti-police rioting. The same jurist, Baltimore Circuit Judge Barry Williams, had previously acquitted two other officers of all charges. A fourth case ended in a mistrial after a majority-black jury voted 11-1 for acquittal. With an 0-4 record, prosecutors may drop remaining charges.

Cleveland Police Officer Timothy Loehmann: In December, a grand jury refused to charge the patrolman for shooting a black youth. The tragic misunderstanding was supposed to be a slam-dunk case of another race-based police shooting.

But enhanced surveillance video made it “indisputably clear” that Tamir Rice — 12, but big for his age — approached the cop and reached for a pellet gun that was “indistinguishable” from a real gun. Loehmann repeatedly shouted, “Show me your hands,” but the boy refused to comply, brandishing the gun instead.

Charlotte, NC, Police Officer Randall Kerrick: Last August, a jury made up of several minorities could not agree that the North Carolina patrolman was guilty of manslaughter in the shooting death of an unarmed black man, Jonathan Ferrell.

Even some black jurors argued for acquittal, believing Kerrick shot Ferrell in self-defense when Ferrell, a college football player under the influence, violently charged at the rookie cop, who was responding to a home-invasion report. Prosecutors decided not to retry Kerrick, and the city will pay him $200,000 in back pay and legal fees.

NYPD Officer Daniel Pantaleo: A racially diverse Staten Island grand jury in 2014 decided not to charge Pantaleo for using a takedown maneuver to restrain 350-pound career petty criminal Eric Garner, who was resisting arrest.

Jurors did not agree Garner, who died at the scene, was killed by an illegal “chokehold” as activists portrayed it. New York City settled a wrongful-death claim with Garner’s estate for $5.9 million.

Ferguson, Mo., Police Officer Darren Wilson: A grand jury in 2014 cleared Wilson in the shooting death of Michael Brown, finding the patrolman acted in self-defense after Brown punched him in the face and tried to shoot him with his service pistol.

Brown had just moments earlier robbed a liquor store. His accomplice falsely testified Wilson shot Brown in cold blood as Brown held up his hands. The lie sparked the “Hands up, don’t shoot” cries of rioters, who torched and looted Ferguson.

Prejudging the case as an example of “systemic” racism, Obama sent an army of prosecutors to investigate Wilson for discrimination, while sending emissaries to Brown’s funeral. Faced with the same evidence the jurors weighed, however, the Justice Department had to agree that Wilson was justified in shooting Brown.

It’s a familiar pattern: Some witnesses embellish or outright lie about what they saw and outrage goes viral — before jurors discover through the actual facts that what looked like another wrenching case of police brutality was actually police largely going by the book — and certainly not acting like the monsters they were made out to be.

The same pattern appears to be playing out in the new Minneapolis and Baton Rouge police-shooting cases. In the first case, a witness changed her story about what happened. In the latter, a BLM activist has been caught editing video to only show one side of what happened — the side that, of course, puts cops in the worst light possible.

Judges and jurors are debunking charges of “systemic racism” in policing as another of the left’s many false narratives. But the damage may already have been done, as evidenced by the vicious war on cops and a related violent crime wave in major cities across the country.

Paul Sperry is author of “Infiltration” and “The Great American Bank Robbery.”