LAKESIDE, Calif. — In this congressional district just east of San Diego, a Christian Democrat, Ammar Campa-Najjar, has been portrayed by his Republican opponent as an Islamic terrorist sympathizer.

The same allegation has been tossed at Democratic candidates in Ohio and New Jersey, and a challenger to an embattled Republican incumbent in the suburbs of Richmond, Va., has been attacked for her part-time teaching gig at a Muslim high school.

It has been 17 years since the attacks of Sept. 11, 2001. But in an era when President Trump has made fear of immigrants central to his political reign, Republican ad makers have seized on terrorism as a new weapon to wield against Democrats in the midterm races.

The ads — largely produced by the Congressional Leadership Fund, a Super PAC associated with Speaker Paul D. Ryan — have frequently been criticized by fact checkers and national security groups as truth-stretching digital irruptions designed to rattle residents in districts where normally safe Republicans feel the hooves of disenchanted voters stomping toward them.