For years now, analysts have predicted that America’s changing demographics — most notably, the declining white population share and the rising Hispanic share — would usher in a permanent Democratic majority. Over the long term, demographic trends do indeed pose a sizable challenge to Republicans. But the 2020 election reminds us that political sympathies and party identification are not set in stone.

While we should treat this year’s exit polls with caution, it appears that Donald Trump won around 47 percent of Hispanic voters in Florida, up from 35 percent in 2016, and roughly 41 percent in Texas, up from 34 percent. Even in Nevada, a state that Trump lost, he increased his share of the Hispanic vote from 29 percent to 35 percent.

Cuban Americans in the Miami area have long been famous for their Republican leanings, so the outcome in Florida should not have shocked anyone, especially given Cubans’ aversion to the “democratic socialism” espoused by Bernie Sanders, Alexandria Ocasio-Cortez, and other progressives.

However, the outcome in the heavily Mexican-American Rio Grande Valley of South Texas really was shocking. Take Starr County, which borders the Mexican state of Tamaulipas. At 96 percent, it has the highest Hispanic population share of any county in America. In 2016, Hillary Clinton won Starr County by 60 points. In 2020, Joe Biden won it by only 5 points. This represented “the largest swing to Mr. Trump of any county in the U.S.,” writes Wall Street Journal correspondent Elizabeth Findell.

We also saw a major swing in next-door Zapata County, which is 95 percent Hispanic. After backing Hillary by 33 points in 2016, Zapata went for Trump by more than 5 points in 2020.

How did that happen?

Findell stresses economic concerns, primarily over COVID-19 lockdowns and jobs in the oil industry, a crucial source of local employment. She also notes that, “aside from Mexican heritage and Spanish surnames,” the Rio Grande Valley shares key demographic similarities with white rural areas.

“Many South Texans live in communities with lower-income and lower-education rates. In Starr County, just over half of its 65,600 residents graduated high school, and the unemployment rate of 18.5% is the highest in Texas. The region is ethnically homogenous, rural in parts, deeply religious, intensely patriotic, socially conservative and hurting economically.”

Beyond the presidential vote, Hispanics also helped Republicans defy the prognosticators and gain seats in the House of Representatives.

“The races where Republicans most vastly outperformed everyone’s priors were heavily Hispanic districts that swung enormously to Trump,” writes Dave Wasserman of the Cook Political Report. “These include both GOP pickups in Miami (Carlos Gimenez in FL-26 and Maria Elvira Salazar in FL-27) as well as Republican Tony Gonzales’s hold of Rep. Will Hurd’s open TX-23. Amazingly, Republicans didn’t lose a single seat in Texas.”

What about Trump’s stance on immigration? Why didn’t that repel more Hispanic voters, as Democrats thought it would?

Two reasons. First, many Hispanics probably decided that other issues were equally or more important. Second, most Hispanics do not support open borders or attacks on U.S. law enforcement. Just ask Rep. Vicente Gonzalez, a South Texas Democrat who won his district (TX-15) by 21 points in 2018 but then squeaked to victory by only 3 points in 2020.

“Defund police, open borders, socialism — it’s killing us,” Gonzalez tells the New York Times. “I had to fight to explain all that.”

Indeed, while journalists often portray Hispanics as overwhelmingly in favor of lax immigration policies, the truth is far more complicated.

Consider a Pew Research Center survey conducted in December 2019. The survey found that 83 percent of Hispanics believe it is very or somewhat important to create a way for illegal immigrants in the U.S. to achieve legal status. No surprise there.

Yet the survey also found that 76 percent of Hispanics feel it is very or somewhat important to improve U.S. border security, and 66 percent say it is very or somewhat important to increase security along the U.S.-Mexico border in particular to reduce illegal crossings.

Moreover, a clear majority of Hispanics — 56 percent — told Pew that the U.S. does not have a responsibility to take in asylum seekers arriving at the southwest border from El Salvador, Guatemala, and Honduras.

In addition, the survey showed that nearly half (48 percent) of U.S.-born Hispanics believe it is very or somewhat important to increase deportations of illegal immigrants.

Thus, moving radically leftward on immigration, as the Democrats have done, will actually turn off significant numbers of Hispanic voters.

One final point, on education levels: As of 2019, only about 19 percent of Hispanics age 25 and older had a bachelor’s degree or higher, compared with 36 percent of all U.S. adults in that cohort, according to federal data. Writing in Tablet, University of Texas professor Michael Lind observes that education, culture, and politics are increasingly intertwined — and “it appears that longer-resident and second-generation Hispanics without college educations are assimilating to the norms and culture of non-college-educated working class whites in their regions.”

Bottom line: Demography is not always electoral destiny. Joe Biden may be the projected presidential winner, but the GOP should feel encouraged by its better-than-expected performance among Hispanics. Whether these gains will prove durable remains to be seen.