The evolution of California from a Republican-leaning purple state into one that’s deeply blue is one of the most dramatic chapters in the state’s political history.

Republicans dominated statewide elections in the 1980s and into the 1990s, only to quickly decline into an irrelevance that will be underscored again this year by more defeats – possibly including the loss of several congressional seats.

Conventional wisdom has it that the GOP brand was irrevocably damaged in 1994 when Republican Gov. Pete Wilson, while seeking a second term, campaigned for a ballot measure, Proposition 187, that would have, if upheld by the courts, eliminate all public benefits for undocumented immigrants.

It worked for Wilson as he defeated Kathleen Brown, current Gov. Jerry Brown’s sister. Republicans that year also claimed half of the other statewide offices and won nominal control of the Assembly.

However, so goes the theory, Proposition 187 alienated the state’s burgeoning Latino population, which had previously given a substantial share of its votes to Republicans, and sparked a surge in Latino political involvement that lifted Democrats into domination.

Unquestionably, Proposition 187 contributed to the Republican slide, but another event of the era – the end of the Cold War and the resulting devastation of Southern California’s aerospace/defense industry – was also a major factor.

More than a million people, many if not most defense industry workers and their families, fled from Southern California to other states, and took their pro-Republican voting patterns with them.

Immigrants from other countries quickly neutralized Southern California’s population loss and a strong, Latino-oriented labor movement emerged. The political effect was to shift Los Angeles County, which has a quarter of the state’s population, from semi-neutral in statewide elections to strongly Democratic, tilting the entire state.

Finally, as a shrinking Republican Party made an ideological turn to the right, it lost ground in the suburbs, once GOP bastions, on such issues as abortion, environmental protection, gun control and gay rights while crime, which had fueled the party’s success in previous decades, shriveled as a hot-button issue.

The latest pre-election voter registration data from the secretary of state’s office graphically display California’s political reorientation from “Reagan Country” into the self-proclaimed capital of the anti-Donald Trump “resistance.”

Twenty years ago, when Democrat Gray Davis was winning an election to succeed Wilson, Democrats claimed 46.7 percent of the state’s registered voters and Republicans 35.6 percent. Since then, the Democratic share has actually decreased a bit to 43.8 percent, but GOP voters have plummeted to just 24.5 percent, while independents, officially “no party preference,” have more than doubled from 12.6 percent to 26.8 percent.

However, polling by the Public Policy Institute of California also found that independents lean Democratic by a 4-3 margin, so the real Democratic voter base is well over 50 percent, even in affluent suburban counties. It’s no accident that the most embattled Republican congressional seats this year are in Orange County.

Latinos are the state’s largest ethnic group, with about 40 percent of the population, but they are still just 21 percent of the likely voters this year while whites are 59 percent, according to PPIC’s research. Thus, the most important shift of political allegiance over the last generation has been that of whites, particularly in the suburbs and particularly women, who identify as Democrats far more than do men.