“A lot of Democrats were rightly worried that if you had a more progressive nominee, an avowed Democratic socialist on the ticket like Bernie Sanders, flipping a state like North Carolina … would have been much harder,” said Jessica Taylor, Senate and governors editor for the Cook Political Report.

Republicans are on defense in states they previously thought safe, most notably Montana. The state’s Democratic governor, Steve Bullock, launched his Senate campaign in March. A recent poll showed him leading the Republican incumbent, Steve Daines, by seven points, even though Trump carried Montana by 20 in 2016.

“I think the Democrats have done a better job of putting more races in play than the Republicans have,” Kondik said, “although Republicans are just defending many more seats.”

Democratic candidates have seen better fundraising numbers, which party strategists say is a reflection of grassroots energy. For example, in Maine, in the first quarter of this year, Sara Gideon raised nearly three times as much money as the Republican senator Susan Collins.