Republicans are in control more often than not in state capitols across the country, but Democrats are trying to pull a little closer in elections Tuesday for governor and state legislature.

Among the headliners are closely contested open governor’s races in Florida and Georgia, two Deep South states where black candidates would break barriers if they win but face Republicans who are drawing energy from their close alignment with President Donald Trump.

Democrats are hoping enthusiasm among their voters will flip governor’s seats in Iowa, Illinois and Kansas as well as traditional battleground states Michigan, Nevada, Ohio and Wisconsin.

Voters are electing 36 governors and 6,089 state legislators Tuesday.

In all, voters are choosing 36 governors and 6,089 state legislators in general and special elections that have attracted record amounts of spending from national Democratic and Republican groups.

The political parties are trying not only to win now, but also to put themselves in strong position for the elections two years from now that will determine which party will have the upper hand in redrawing congressional and state legislative districts.

Voters also are deciding ballot measures in four states — Colorado, Michigan, Missouri and Utah — that propose to overhaul the redistricting process and reduce the likelihood of partisan gerrymandering by either major party.

Republicans entered Tuesday’s election with a sizable advantage, controlling two-thirds of the 99 state legislative chambers and 33 governors’ offices. The GOP held a trifecta of power in 25 states, compared with just eight for Democrats.

Parties that fully control the legislative and executive branches can enact policies that might not pass with a divided government. For example, Missouri’s Republican trifecta enacted a right-to-work law limiting union powers that was repealed in a voter referendum in August. California’s Democratic-dominated Legislature, with the help of one Republican lawmaker, enacted a 12-cent gas tax hike to pay for road repairs. That law faces a referendum seeking to repeal it on Tuesday’s ballot.

History suggests Democrats are likely to make gains during the first midterm election involving Republican President Donald Trump. Some of Democrats’ best chances at new trifectas are in Illinois and New Mexico, where they already control both legislative chambers and are attempting to flip the governor’s office.

History suggests Democrats are likely to make gains during the midterm election.

In New York, even a slight gain by Democrats could wrest the state Senate from Republicans and thus give Democrats a governing trifecta. Republicans are largely on defense but also are angling for gains in a few traditionally Democratic states, such Connecticut.

A large-scale reversal of state political fortunes appears to be a long shot.

“It’s a year that could be good for Dems,” said Jon Thompson, a spokesman for the Republican Governors Association. “But Republicans are still in a good position to hold a large majority of governorships.”

The governor’s races have extra emphasis in 28 states where the winners will serve four-year terms with the potential power to approve or reject district boundaries drawn for Congress or state legislatures.

The Democratic Governors Association has focused on nine swing states — Colorado, Florida, Georgia, Maine, Michigan, Nevada, Ohio, Pennsylvania and Wisconsin — where it believes the governorships could be pivotal in congressional redistricting. Republicans currently hold trifectas in Florida, Georgia, Michigan, Ohio and Wisconsin. The rest have split partisan control.

“Those states together are majority-makers in Congress,” said Jared Leopold, a spokesman for the Democratic Governors Association. “If you can elect Democrats in a good portion of those states, you can prevent Republicans from doing the same kind of gerrymandering in 2021 that they did in 2011.”

As of mid-October, the Democratic Governors Association and its affiliated entities had raised $122 million during the past two years — a record outdone only by the Republican Governors Association’s new high mark of at least $156 million.

The Democratic Legislative Campaign Committee and Republican State Leadership Committee, which focus on state races, also set record fundraising targets. The National Democratic Redistricting Committee, led by former Obama administration Attorney General Eric Holder, has pumped additional money into state races viewed as critical in future redistricting decisions.

Although most state lawmakers responsible for redistricting will be elected in 2020, voters on Tuesday are electing more than 800 state lawmakers in about two dozen states to four-year terms where they could play a role in approving new congressional or state legislative districts.