Today, as in the past, California sees itself seen as a beacon of hope, as the last Promised Land in the United States. That’s how it’s been since 1849, when the world rushed in for gold. The state’s rulers welcomed the so-called Argonauts, as well as subsequent generations of other Americans: Midwesterners lured by our warm climate, suburbanites who bought up tract housing and joined the defense industry, sports franchises who wanted to leave the cold East, tech giants in Silicon Valley, and others.

But the group that California’s politicians now champion is unprecedented in our history: Immigrants.

The rest of the country would never believe that a state that has essentially declared itself a sanctuary for undocumented folks was, for nearly all of its existence, the most xenophobic in America. But not only is that true, it’s also why the legislature — now run by Gen X Latinos who came of age during the last gasp of white America in California — has become so stridently pro-immigrant. It’s not just because it’s the right thing to do, but to atone for the sins of their predecessors.

The rest of the country would never believe that a state that has essentially declared itself a sanctuary for undocumented folks was, for nearly all of its existence, the most xenophobic in America.

How nasty was California to immigrants? Rich Yankees before the Gold Rush married the daughters of the state’s Mexican gentry (called “Californios”) and effectively erased their blood lines; The much-vaunted 49ers either squatted on any remaining Californio property, sued them into bankruptcy or just murdered them with little fear of the law. The first California legislature barred Native Americans from voting and allowed whites to turn Native American children into indentured servants. The Foreign Miner’s Tax pushed Chilean, Mexican, and Chinese immigrants out of the Gold Rush; the Greaser Act of 1855 said law enforcement could arrest any Mexican (then called “greasers”) “who can give no good account of themselves.”

Get the think newsletter. This site is protected by recaptcha

Not bad for the first five years of statehood, right?

The state of California just got worse from there, targeting virtually every non-white group that ever tried to settled. Chinese? The California Constitution of 1879 declared that no business in the state should “employ directly or indirectly, in any capacity, any Chinese or Mongolian”; such machinations directly led to the Chinese Exclusion Act. Asians? The California Alien Land Law of 1913 prohibited all natives of the entire continent from owning land. Japanese? Earl Warren, as state attorney general, pushed for their internment during World War II. African-Americans? Proposition 14 in 1964 repealed the Rumford Fair Housing Act, which banned discrimination against renters.

Immigrants and supporters rally and march in opposition to the President Trump order to end DACA, on Sept. 5, 2017 in Los Angeles. David McNew / Getty Images

Hell, we even tried to ban Okies from living here during the Great Depression, and they were white, patriotic conservatives.

But California has hated no newcomer group more than Mexicans, which is funny, because the state had been Mexico. From the Greaser Act to state-sponsored deportation efforts during the 1930s and 1950s and school segregation to a bevy of voter-supported propositions that declared English the state’s official language (Proposition 63 in 1986), threatened to criminalize anyone who assisted undocumented immigrants (Proposition 187 in 1994), ended affirmative action (Proposition 209 two years later) and stopped bilingual education (1998’s Proposition 187), California has treated Mexicans as its favorite political piñata.

I actually understand California’s historical hatred against the above immigrants and others: Until very recently, suburban, middle-class whites ruled, and feared anyone that didn’t look like them. They could get away with all the increasingly outlandish propositions — seriously: when did bilingual education ever hurt anyone? — because California’s biggest bloc of voters was Nixon’s silent masses.

Maribel Coria, from left, of Antioch, Calif., participates in a candlelight vigil against Proposition 187, in front of the Federal Building on Oct. 25, 1994 in Oakland, Calif. Ben Margot / AP file

But the state’s xenophobic streak bit off more than it could ever chew with Proposition 187. It came at a time when the children of undocumented immigrants were attending college in record numbers, when high schoolers finally realized it was okay to be puro mexicano and not have to proclaim their Americanness all the time. Hundreds of thousands of them marched in protest in 1994, and got radicalized by hearing conservative rail against their parents and friends — and, many times, them.

If California Republicans had just been nicer with their xenophobia in the 1990s, you wouldn’t have had the Reconquista at the polls that now dominates California and is slowly spreading across the country. Those activists kids are now in their late 30s and mid-40s and many dedicated their lives to fighting xenophobia after 187’s victory (a federal judge later ruled it unconstitutional), and have succeeded mightily in motivating the generations after them to fight.

That’s why, as Trump visits California to inspect his border wall, and Attorney General Jeff Sessions sues us in court, I can’t help but to remember the Prop. 187 days. The Republican Party in California is essentially extinct; the California legislature gets more and more progressive every year with glee. For those Americans who look to Cali as the last, best hope against Trump, know that we got this, because we know how to beat down racism.

And for those who see California as a progressive beast worthy of subjugation: Watch out. Because if we were able to redeem ourselves, then anywhere can.

Gustavo Arellano is the California columnist for the Los Angeles Times opinion section, and a lifelong resident of Orange County, California, where he's reported on the craziest county on Earth for over 16 years.