The Republican base is “coming home” before Tuesday’s midterm elections because President Donald Trump has nationalized the illegal immigration issue, according to Bill McInturff, the Republican pollster who conducts the NBC/Wall Street Journal (WSJ) poll with Democrat Peter Hart.

Trump has made illegal immigration and the migrant caravan central issues of the 2018 campaign, and a CNN poll released on Monday found that immigration is more important to Republican voters (64% said it was extremely important to their vote) than the economy (60%).

“There has been some method to his madness,” McInturff told CNBC when asked to explain the findings of Sunday’s NBC/WSJ midterm poll. “The base is coming home.”

CNBC noted that the WSJ/NBC poll found that Republicans have cut into the Democrats’ lead on the generic ballot because Trump’s “late campaign blitz” focusing on illegal immigration has “rallied the Republican base of white working-class voters, helping to curb the Democratic advantage heading into Tuesday’s midterm elections for Congress.”

Democrats have a seven-point lead in the generic ballot in the WSJ/NBC News poll, down two points from a month ago before Trump honed in on the illegal immigration issue. The news for Republicans gets better in other polls. Democrats only have a three-point lead in Monday’s Politico/Morning Consult poll while the GOP actually leads in the generic ballot in Rasmussen’s final survey.

Trump said on stump this weekend that the caravan issue has “energized our base.” At a Sunday evening Tennessee campaign rally, Trump said he had a message for the Central American migrants in the caravan: “Turn back now, because you’re not getting in.”

“That’s invasion,” Trump said. “I don’t care what they say.”

Addressing critics who want him to focus more on the economy, Trump said he did not want to spend tons of time talking about the economy because that gets “boring” and the crowd starts “dwindling.” Instead, Trump said he would rather focus on problems facing the country that he needs to solve like illegal immigration.

Focusing on the economic impact of illegal immigration, Trump explicitly made the case this weekend that illegal immigration hurts working-class Americans, especially black Americans and Latino Americans.

“We need to use our precious resources to help Americans who follow our laws, not to reward illegal aliens who break into our country and break our laws,” Trump said.

Trump also said illegal immigration is a women’s issue.

“Women want safe neighborhoods for their families, great schools for their children, and they want violent predators like we’re talking about to be thrown in jail or thrown the hell out of our country,” Trump said at a Saturday afternoon rally in Montana.

Trump’s focus on immigration has given Republicans a fighting chance to retain control of Congress. Hart told CNBC that the polling right before the midterms “is a political kaleidoscope.”

“You turn the poll one way, and it looks [good for Democrats],” Hart reportedly told CNBC, adding that “you can see how the GOP squeaks through” if you turn it the other way.