Democrats wrested control of governorships from Republicans in seven states on Tuesday including Wisconsin, where they ousted Scott Walker after eight tumultuous years as the state’s chief executive, and Kansas, a surprise victory in a longtime Republican stronghold.

But Republicans fended off strong Democratic challenges to hold on to the governorships of Florida, Ohio and Iowa, maintaining their control of three states likely to be crucial in the 2020 presidential elections.

The victories expanded the number of states with Democratic chief executives — an important consideration as legislatures begin the process of drawing congressional district lines. In addition to Kansas and Wisconsin, Democrats also picked up governor’s seats in Nevada, Illinois, Michigan, New Mexico and Maine.

Still, the results reflected a night of mixed tidings for the party out of power, given that Democrats were hoping to install a rising young star in Florida and sweep the midwest states where President Trump forged the core of his unexpected victory two years ago.