New York billionaire George Soros’ multimillion-dollar effort to reshape California's criminal justice system by propping up progressive district attorney candidates backfired Tuesday, with most of his candidates suffering major defeats.

Soros, together with other wealthy liberal donors and groups, spent millions on would-be prosecutors who favor lower incarceration rates, crackdowns on police misconduct and changes in a bail system that they argue discriminates against the poor.

But most of the money went to waste as their candidates lost to more traditional law-and-order prosecutors who didn’t share progressive views or have hostile attitudes toward police.

SOROS SPENDS BIG IN CALIFORNIA’S DA RACES IN BID TO RESHAPE CRIMINAL JUSTICE SYSTEM

In Sacramento County, District Attorney Anne Marie Schubert defeated Noah Phillips by a nearly 2-to-1 margin, getting 65 percent of the vote. Phillips led an insurgent campaign, attacking Schubert for failing to prosecute a police officer who shot a civilian.

He reportedly received around $400,000 from Soros and admitted Soros' team scripted and paid for a TV ad during the campaign, the Los Angeles Times reported. His fundraising efforts received help from Cari Tuna, wife of Facebook co-founder Dustin Moskovitz, who contributed more than $650,000 to a political action committee led by Black Lives Matter activist Shaun King.

"This is a good day for the people," Schubert told to a crowd of about 100 supporters after she won the election, the Sacramento Bee reported. "You can't buy an election in the county of Sacramento. Here's to four more years."

"This is a good day for the people. You can't buy an election in the county of Sacramento. Here's to four more years." — District Attorney Anne Marie Schubert

Geneviéve Jones-Wright, the Soros-favored candidate in San Diego County, also suffered a major defeat Tuesday. She got only 36 percent of the vote while her opponent, District Attorney Summer Stephan, received more than 60 percent.

Soros spent more than $1.5 million in the race, funneling the money to a political action committee that propped up Jones-Wright’s candidacy as she pledged to form a police-misconduct unit and supported progressive reform of the criminal justice system.

Stephan fought back against the influence of outside money in the race, declaring Soros’ backing a public safety threat. Jones-Wright, meanwhile, insisted the money merely gave a voice to minorities and poor people.

In Alameda County, in the San Francisco Bay Area, District Attorney Nancy O'Malley fended off a challenge from Pamela Price, reportedly receiving more than 60 percent of the vote.

O'Malley said she was surprised the outside donors tried to oust her, given that she’s a registered Democrat and was endorsed by U.S. Sen. Kamala Harris, D-Calif., organized labor and other Democratic groups.

Soros’ PAC accused O’Malley during the campaign of implementing “racist” stop-and-frisk policies and Price criticized her for being cozy with law enforcement groups.

FACEBOOK CO-FOUNDER’S WIFE SPENT $650G ON SHAUN KING’S PAC BID TO REFORM CRIMINAL JUSTICE SYSTEM

But there was one victory for the wealthy liberals Tuesday. Progressive DA candidate Diana Becton received a majority of the votes in Contra Costa County, also in the Bay Area, though not enough to secure an outright victory.

She will now face off against Senior Deputy District Attorney Paul Graves – who came second – in a run-off election. Graves criticized the influence of wealthy outsiders, describing them as “billionaires who apparently think Contra Costa's public safety is for sale.”

In other counties – such as Yolo County, Riverside County, and San Bernardino County – where wealthy donors also spent money, albeit on a significantly smaller scale, most progressives candidates suffered defeats. One exception: reform-minded defense attorney Jason Anderson, who managed to win in San Bernardino County against four-term DA Michael Ramos.