In tweets and campaign rallies in recent days, President Trump has returned to his signature cause of immigration, inveighing against drug traffickers and a caravan of immigrants.

Trump’s strategy makes perfect sense politically. He hopes to prod the Republican base to turn out in the midterms in November. One of the most effective ways to motivate political action is to stoke fears among your supporters.

Strikingly, however, public opinion data suggest that Trump has failed to convince the public on immigration and has even helped to turn the public against his positions — an effect that may grow stronger as his anti-immigration campaign intensifies.

The evidence suggests Trump has failed to convince most Americans to support his views on immigration. Since he took office, for instance, the number of Americans who say immigration is a good thing for the country has reached record highs in Gallup polls. The increase is expectedly most pronounced among Democrats, who typically react negatively to positions that Trump takes, but it’s also noticeable among Republicans. Similarly, he is proposing immigration restrictions that a majority of Americans oppose. Polling shows that approximately six in 10 Americans are against building a U.S.-Mexico border wall, a figure that has been stable since fall 2016, and approximately seven in 10 support allowing undocumented residents to stay and apply for citizenship.

As Trump moves policy to the right on immigration, the public may shift in the opposite direction, becoming more supportive of more generous policies.

Presidents frequently encounter such challenges when they try to change public opinion on most public policy issues — the appeals they offer are often ignored and can even be counterproductive. As political scientist George C. Edwards notes, Ronald Reagan lamented that he could not muster public support for aid to the Contras, a rebel group in Nicaragua. Reagan’s pollster even advised him to stop giving high-profile speeches on behalf of the cause for fear of generating more opposition in Congress and among the public.

Trump’s immigration appeals may have a similar effect in mobilizing opposition to his policies. In a recent Washington Post/ABC News poll, twice as many Democrats as Republicans named immigration as one of the top issues facing the country. The polling firm Latino Decisions finds that Latinos now name protecting immigration rights as the top issue facing their community, and that ads about the threat from the MS-13 gang, a frequent focus of Trump’s speeches, turned white college-educated voters against the candidacy of Ed Gillespie, the Virginia gubernatorial candidate.

This reaction may also be partly thermostatic in nature. As Trump moves policy to the right on immigration, the public may shift in the opposite direction, becoming more supportive of more generous policies. Most notably, support for allowing unauthorized immigrants living in the United States to stay and apply for citizenship increased from 55 percent in August 2015 (just two months after Trump’s speech announcing his candidacy) to 67 percent in June of this year.

A final factor is the intense media scrutiny that Trump’s immigration policies, like family separation, have faced since he took office. This finding is consistent with a recent study using data from Sweden to examine the causal effect of a far-right anti-immigrant party increasing its seat share in local municipality councils. When the party, the Sweden Democrats, increased its seat share, opposition to immigration decreased in those municipalities — an effect the authors attribute to increased negative media coverage.

Ultimately, however, these forces have failed to induce any change in Trump’s positions or deter him from campaigning on the issue. In our highly polarized system, politicians value the preferences of co-partisans most, especially if they are intensely felt and closely related to group identities. What is surprising is how rarely they now bother to pretend otherwise.