So did Republican attacks on immigrants mobilize any voters in 2018? Yes, but it came in the form of Latino voters who reversed their record-low turnout in 2014 with record-high turnout in 2018. In the Election Eve poll, 73 percent of Latinos said Mr. Trump made them angry, while 72 percent said that they felt disrespected. Forty-eight percent of Latino voters agreed that Mr. Trump is a racist whose policies are intended to hurt Latinos, and 27 percent said that Trump policies have had a negative impact on Latinos, while 18 percent said Mr. Trump was having a positive impact on Latinos.

In 2001, the political scientists Adrian Pantoja, Ricardo Ramirez and Gary Segura established that perceived immigrant attacks have a strong mobilizing effect among Latino voters. In 2018, Latino voters once again proved that thesis correct.

In California, Latino voters increased their turnout enough to oust five Republican incumbents and help Democrats pick up two open seats. In Texas, Democrats won two House seats where Latino turnout was up. In New Jersey, Democrats gained four seats. Next door in New York, Democrats picked up three seats. There were two more Democratic pickups in Latino-majority districts in Florida, and one each in New Mexico and Arizona, while Democrats held on to two hotly contested seats in Nevada.

A recent analysis by the Latino Policy and Politics Initiative, a research center at U.C.L.A. that I helped found, revealed that across eight states with sizable Latino communities, the Latino vote grew by 96 percent from 2014 to 2018, compared with a more modest 37 percent in growth in the votes cast by non-Latinos. In a postelection analysis, Latino Victory Project and the Democratic Congressional Campaign Committee noted that early voting among Latinos increased by 174 percent. The U.C.L.A. study also concluded that higher Latino turnout was influential in flipping 20 of the 40 House seats that Democrats gained.

When asked how they engaged were by the 2018 election, 77 percent of Latino voters in the 70 swing districts identified by The Cook Political Report said that they actively encouraged their friends and family to vote. But it was not just self-mobilization; campaign outreach mobilized Latinos. In these 70 competitive districts, 53 percent of Latinos said someone contacted them and asked them to register or vote, thanks in part to efforts by the D.C.C.C., which invested $30 million in targeting Latino voters in battleground districts. (My firm, Latino Decisions, worked with the D.C.C.C., although I did not work on any direct campaign efforts for individual candidates.)

So what does this mean for 2020? First, it’s going to be much harder for Mr. Trump and Republicans to persuade Americans that immigrants are ruining our country. Before Mr. Trump took office, Republicans were more trusted than Democrats on immigration, but now it’s Democrats who are more trusted.

Nonetheless, Mr. Trump will continue attacking immigrants in 2019 and 2020. Indeed, he vows to shut down the federal government to get his border wall. While he is likely to get standing ovations at his rallies when he denigrates immigrants, the number of voters who favor his immigration agenda is shrinking. Perhaps worse news for the Republican Party is that many Latino voters view Mr. Trump’s deeds, words — and the man himself — as racist, and the 2018 election demonstrated that the community is eagerly awaiting its chance to vote him out in 2020.

Matt A. Barreto (@realMABarreto) is a professor of Chicano studies and political science at the University of California, Los Angeles, a co-founder of the polling firm Latino Decisions and the author of “Latino America: How America’s Most Dynamic Population Is Poised to Transform the Politics of the Nation.”

Follow The New York Times Opinion section on Facebook, Twitter (@NYTopinion) and Instagram.