President-elect Donald Trump ran on an immigration enforcement platform, and when crafting policies his administration can take some lessons from California and Texas’s experience. Their experience suggests smart ways to enforce immigration laws without causing a political backlash or economic problems. As a Republican, President Trump should be inspired by how Texas conservatives have handled immigration instead of looking to California’s Republican Party.

California and Texas are similar in many ways. Hispanics are about 39 percent of the population of both states, both share a border with Mexico, and both have a long history of Mexicans living there (although Texas’ history is longer and richer). Crucially, large numbers of voters in both states have worried about illegal immigration and border control for decades. However, the political outcomes in both states are radically different because their state Republican parties dealt with illegal immigration and border security in very different ways.

California Turned Everyone Into ICE Agents

The California Republican Party in 1994 alienated Hispanics and businesses that supported immigration. Gov. Pete Wilson’s 1994 reelection campaign featured support for Proposition 187, which had two portions.

The first was a perfectly sensible bar on illegal immigrants consuming government services. The second, however, would’ve turned state employees into immigration agents. Every time they came in contact with a suspected illegal immigrant, the state employee was supposed to report that individual to federal immigration authorities.

Illegal immigrants were already barred from most welfare benefits, but turning all state employees into a deportation force ignited a firestorm of opposition.And it hurt Republicans at the ballot box.

Republican gubernatorial candidate George Deukmejian won 46 percent of the Hispanic vote in 1986 and Wilson earned 47 percent in 1990. In 1994, however, Wilson’s support for Proposition 187 dropped his Hispanic support to 25 percent. Although he won reelection that year, Hispanic support of the GOP has hovered around that same 1994 percentage in every year since then except for Arnold Schwarzenegger’s election.

Texas did the opposite of California. Texas Republicans directed their immigration enforcement on the border, not inside of the state. Texas Republicans, by and large, opposed interior enforcement bills. They funneled money to border enforcement, but did not unleash law enforcement to target illegal immigrants inside of the state. They didn’t spread fear among Texas Hispanics in the way the California did among Hispanics there.

Republican Sen. Craig Estes ideologically opposed “show me your paper laws” but also said “[N]othing could alienate Hispanic Americans more than being stopped at random arbitrarily and asked their status because of the color of their skin.” It also pleased Texas businesses and consumers who demanded immigrant labor.

Enforce the Border, and Only the Border

Texas Republicans didn’t ignore illegal immigration, though: they allocated $800 million to extra border security in 2015. They focused on the border, and nothing but the border, meaning that they wouldn’t alienate Hispanic Texans, many of whom have illegal immigrant friends and family members. Texas Republicans learned that concern about border security doesn’t translate into support for checkpoints in Houston.

Republican Lt. Gov Dan Patrick is an outlier. His goal to end sanctuary city policies in Texas, even though there are none, is pure California-style rhetoric but lacks the terrifying substance of Proposition 187. Even if an anti-sanctuary city bill passed it would have no effect on the lives of Texans because there are no sanctuary cities in the state.

Patrick’s rhetoric is a major departure from other leading Texas Republicans such as former governor Rick Perry, who defended the state’s Dream Act to his political detriment in the 2012 Republican presidential primary. The Republican legislature will likely block any anti-sanctuary city bill again, as it would be all sizzle and no steak.

The Texas GOP also supports legal immigration in a uniquely conservative and Texan way, which helps deflect from charges of nativism. In 2015, one Democratic state senator and two Republicans all introduced bills to create a state-based guest worker program for Texas. This type of visa, inspired by recent Cato Institute research, can allow Republicans to support legal immigration from a federalist and conservative perspective.

Trump’s immigration position has seemingly backed him into a political corner. However, he has good options. He can avoid the mistakes of the suicidal California GOP and keep his base happy by following the Texas model. His campaign chant of “build the wall” sets him up perfectly for this type of pivot. Focusing on border security, ignoring calls for interior enforcement that will cause chaos and panic, and supporting a conservative guest worker visa program will allow him to declare victory without alienating the almost 57 million American Hispanics.