Republicans spent the final weeks of the 2018 midterm elections downplaying their tax cut and instead sought to fire up their base with tough talk on immigration and an unrelenting focus on House Speaker-in-waiting Nancy Pelosi, according to a new analysis.

The analysis comes from Democratic strategists at Navigator Research and The Messina Group, and looks at television ads, social media posts, campaign Facebook ads, and candidate and committee websites in 108 congressional districts seen as competitive by the Cook Political Report. The analysis examined the messages both parties used as Democrats flipped 40 seats and took control of the House of Representatives.

What’s more, the analysis shows, many ads in which Republicans do mention taxes didn’t focus on the tax legislation they passed in 2017, which provided a steep tax cut for corporations. Of the GOP ads that referred to taxes, 40 percent also mentioned Pelosi, and 35 percent also raised the subject of health care – often suggesting Democrats would raise taxes to pay for a universal health care system.

“Republicans ran on a negative, anti-Pelosi message first and foremost, rather than a positive message that emphasized their record over the past two years or a constructive vision for the future,” the authors wrote of the GOP’s tax messaging. “Even on an issue for which Republicans have a clear legislative record, they largely spent their energy stoking fear about what Democrats would do instead if they gained control of the House of Representatives.”

Republican messaging on taxes peaked in mid-October, with a majority of ads mentioning the topic in some way. But only about one-third of GOP ads during the rest of the campaign mentioned taxes.

Instead, Republicans ran more ads focused on immigration ― frequently using the term “illegal” and warning of the dangers of sanctuary cities. (Mentions of the gang MS-13 were relatively rare, according to the analysis, appearing in less than 10 percent of GOP ads.)

Interestingly, Republicans ran ads focused on immigration across the political map ― not just in the rural areas that dominate President Donald Trump’s political base and have in the past seemed most susceptible to hard-line immigration rhetoric. The GOP actually aired a slightly higher percentage of immigration ads – 16 percent ― in denser suburban areas than it did in purely rural districts (10 percent), or in districts that were a mix of rural and suburban (12 percent).