But in a year when Democrats are determined to take back control of the House of Representatives, the campaign rhetoric of Mr. Reed, 46, may not be as well received as in previous elections. He faces a formidable challenge from Ms. Mitrano, 60, a cybersecurity expert with a law degree and a Ph.D. in history.

For the record, Ms. Mitrano, who formerly oversaw digital information policy for Cornell University, no longer lives in Ithaca, and most of her political stances are to the right of extreme liberal.

She won a five-way primary in June but was left with only $8,000 in her campaign account. Her chances in the 23rd Congressional District, where registered Republicans outnumber Democrats by more than 20,000, seemed bleak.

But like many Democrats challenging House Republicans in the midterms, Ms. Mitrano has benefited from a surge in grass-roots donations. In the third quarter of 2018, she reported raising $950,000.

The race between Mr. Reed and Ms. Mitrano shares some of the contours defining many contests involving incumbent Republicans. Mr. Reed embraces Mr. Trump’s agenda, including the tariffs that many conservatives say threaten the economy. He has a Trump score of nearly 97 percent, one of the highest of his Republican colleagues in the state. The score is given by FiveThirtyEight, the data journalism website, and measures how often a lawmaker has voted to support the president’s position.