California is in danger of becoming the next South Africa — not because of racial conflict, but because it is following the bad example of placing one overriding ideological priority ahead of all other practical concerns.

In South Africa, that priority is “transformation” — the idea that all of the country’s institutions should reflect the demographics of the nation as a whole, as a way of redressing the discrimination of the apartheid past.

There are some good intentions behind the policy, in theory, but in practice “transformation” has been used to justify ruling-party corruption that has robbed South Africa of its assets and destroyed its infrastructure.

The most tangible symbol of that large-scale looting is the darkened streets of Johannesburg, once the industrial capital of Africa, now reduced to faulty traffic lights, pothole-filled roads, and a sense of despair.

The ruling party created targets for black ownership and employment, granting contracts to those companies that comply. Those companies, in turn, kick donations back to the party so that it can stay in power indefinitely.

The ruling party picks companies controlled by its loyalists. As its greed has increased, it has even favored foreign companies — which are excused from the racial criteria, as long as local cronies are cut into the deal.

And so there is an “iron triangle” of government contracts, “black empowerment” deals, and ruling party kickbacks. The number of “empowerment” middlemen has risen, as has the cost of the contracts to the state.

Few of these deals deliver any value to taxpayers. In effect, they allow ruling party cronies to enrich themselves at public expense, while services and infrastructure collapse. It is organized looting, masquerading as “justice.”

Those who have dared to criticize “transformation” — even within the ruling party — have been tarnished as racists, though the policy has left the vast majority of black people worse off than they had been before.

In California, the analogue is the utopian fight against “climate change.” As in South African “transformation,” there is a kernel of legitimacy to the idea. As in South Africa, it has been abused by rent-seeking interest groups.

The state has set ambitious targets — such as zero emissions by 2045, and a ban on gas-powered vehicle sales by 2030 — without any real plan to achieve them. Solar and wind power are simply unable to meet demand.

Instead of just adding renewable energy sources to the existing mix of energy sources, the state is actively undermining oil and gas — and allowing nuclear and hydroelectric power to wither, despite growing demand.

Already, the state and the federal government have doled out billions of dollars in tax credits and subsidies to so-called “green” companies, without seeing a corresponding improvement in energy efficiency or output.

Meanwhile, California has been left vulnerable to electricity shortages during peak demand, when drivers who are being strong-armed into buying electric vehicles are also asked not to charge them during certain hours.

Those who question the policies aimed at fighting “climate change” — never mind its underlying scientific claims, which are said to be beyond debate — are labeled as “denialists,” and denied platforms to speak.

The risk, as in South Africa, is that California will destroy its own infrastructure in pursuit of a goal it might have actually achieved, had government let well enough alone and allowed the free market to do its work.

Joel B. Pollak is Senior Editor-at-Large at Breitbart News and the host of Breitbart News Sunday on Sirius XM Patriot on Sunday evenings from 7 p.m. to 10 p.m. ET (4 p.m. to 7 p.m. PT). He is the author of the new biography, Rhoda: ‘Comrade Kadalie, You Are Out of Order’. He is also the author of the recent e-book, Neither Free nor Fair: The 2020 U.S. Presidential Election. He is a winner of the 2018 Robert Novak Journalism Alumni Fellowship. Follow him on Twitter at @joelpollak.