One of California’s most enduring conflicts is the one between San Francisco and Los Angeles for economic, cultural and, of course, political dominance.

San Francisco was No. 1 during the latter half of the 19th century, its dominance fueled by the gold rush and the banking empires it spawned. But Los Angeles came on strong during the 20th century as its population surged with immigration from other states, its industrial base expanded and its port became the nation’s gateway to Asia and the Pacific Rim.

The not-so-friendly competition continues in the 21st century with high-technology powering San Francisco’s economic and political potency, while Los Angeles struggles to absorb and employ immigrants, especially those from Latin America.

The north-south rivalry could play out in the political arena next year as two former mayors, San Francisco’s Gavin Newsom and Los Angeles’ Antonio Villaraigosa, vie for the governorship, with the winner immediately becoming a potential presidential contender.

A recent poll by the University of California, Berkeley’s Institute of Governmental Studies points in that direction, showing Newsom, now the lieutenant governor, leading with support from 22 percent of the state’s likely voters, and Villaraigosa not far behind at 17 percent.

That’s a six-point drop for Newsom between March and May, and a six-point gain for Villaraigosa. The two other declared Democrats, Treasurer John Chiang and former state schools Supt. Delaine Eastin, trail badly, scoring in the low single digits.

Of course, it’s still nearly a year before the first round of voting and anything could happen. It might be possible for a Republican to sneak into the runoff, but the two who have expressed interest register very low in the poll. Therefore, at the moment a Newsom-Villaraigosa duel in November 2018, thanks to the state’s “top-two” primary system, is the most likely scenario.

Assuming it happens, how would a Newsom-Villaraigosa matchup play out?

First of all, the winner would have to do more than appeal to his fellow Democrats, because there aren’t enough of them (just over 40 percent of registered voters) to elect a governor on their own. He would have to appeal to Republicans and independents as well, which makes ideological positioning a potentially decisive factor.

Newsom is going all out to capture the very active, uber-liberal wing of the party, not only stridently opposing anything and everything associated with President Donald Trump but also endorsing universal health care and other left-wing priorities. He picked up an important endorsement this week from liberal icon John Burton, who just stepped down as state party chairman. Burton, a San Franciscan to the core, touted Newsom’s “great intellect and outstanding courage.”

Villaraigosa, meanwhile, isn’t shy about denouncing Trump but also comes across as the less liberal of the two candidates. He’s questioned the economic viability of universal health care and made enemies by endorsing educational reforms in Los Angeles that the teachers’ union opposed, including a recent takeover of the Los Angeles Unified School District board by union-opposed candidates.

Both carry some baggage from personal love-life scandals during their mayoral careers, so that aspect more or less zeroes out. Villaraigosa would be strongly favored by Latino voters, as the IGS poll shows, while Newsom is a hero to gay-rights advocates for his championing of same-sex marriage.

It would be a whale of a contest, one in which politicians from both cities have been itching to engage for decades.