Gov. Gavin Newsom scored a three-point political play last year when the Legislature and voters approved a mid-decade reconfiguration of the state’s 52 congressional districts.

The gerrymander aimed to shift five congressional districts held by Republicans to Democratic control, thus neutralizing the five seats that Texas Republicans were grabbing at President Donald Trump’s behest as the two parties joust for control of Congress.

The GOP has a paper-then majority in the House now and Republican leaders are worried — with good reason — that Trump’s unpopularity and the tradition of a sitting president losing seats could shift control.

Newsom saw an opportunity to exploit Californians’ deep disdain for Trump, help his party regain a House majority and advance in the shadow campaign for the White House in 2028. Voters cooperated in a special election by approving Proposition 50 by a nearly 2 to 1 margin.

This month’s primary election underscored how creative political cartography can tilt outcomes.

Democrats might not gain all five seats that Prop. 50 was designed to shift, but they will get at least a few. Republicans have a fair shot at preserving one of the five — that of San Joaquin Valley Rep. David Valadao — and outside chances in two others.

Valadao’s hopes of survival were brightened when progressive Randy Villegas defeated moderate Democrat Jasmeet Bains. While Democrats have an 18 percentage-point voter registration advantage in the 22nd District, its Democratic voters hew to the middle. Villegas, who is endorsed by democratic socialist U.S. Sen. Bernie Sanders, could be leaning a little too far to the left for Central Valley voters.

Two other gerrymandered districts are also in play.

Rep. Kevin Kiley dropped his Republican credentials and is running for re-election in the 6th District, a string of suburbs that more or less surround Sacramento. Kiley survived the primary and will face Democrat Richard Pan, a former state legislator, in November. The Democratic voter registration edge is less than 9 percentage points, so Kiley has a chance to win.

Meanwhile, in the newly redrawn 48th District in San Diego and Riverside counties, Rep. Darrell Issa is retiring but Republican Jim Desmond, a San Diego County supervisor, is competitive. His Democratic foe, Marni von Wilpert, sits on the San Diego City Council and has only a slight Democratic voter registration advantage.

The bottom line is that Democrats could gain as many as five seats in November and as few as two. Whether Prop. 50 will be a game-changing factor in the battle for control of Congress depends on what happens in other states.

The dueling gerrymanders in Texas and California touched off efforts in a handful of other states, both red and blue, that accelerated after the U.S. Supreme Court declared in April that a long-standing interpretation of the Voting Rights Act’s effect on redistricting was void.

Acting on a case out of Louisiana, the court said that consciously creating districts for specific ethnic and racial communities is “racial gerrymander” and unconstitutional. Very quickly the Louisiana Legislature eliminated one of its two districts represented by Black Democrats, and redrew it for a Republican.

Some red states followed suit and politicians in blue states tried to emulate California, most obviously in Virginia. However, Virginia’s Supreme Court struck down a redistricting ballot measure and the U.S. Supreme Court refused to intervene.

All in all, it appears that Republicans are coming out on top in the gerrymander war, but by how much is still uncertain. An effort to redraw Alabama’s congressional districts is still up in the air. If it succeeds, the GOP could gain as many as 10 new seats, CNN has calculated.

There is, however, one clear winner in California: Gavin Newsom. Regardless of what happens in November, his gerrymander campaign, framed as a rebuke to Trump, has enhanced his standing as one of the leading potential candidates for president two years hence.

Dan Walters is one of most decorated and widely syndicated columnists in California history, authoring a column four times a week that offers his view and analysis of the state’s political, economic,...