A bitterly fought governor's race in Virginia leads a slate of state and local elections on Tuesday that offer an early test of President Donald Trump's political influence and possible strategies for both parties in next year's midterm elections.

New Jersey voters also will pick a new governor to replace outgoing Republican Chris Christie. Several big cities will select mayors and conservative Utah will hold a special election to replace U.S. Representative Jason Chaffetz, a Republican who stepped down before his term ended.

The marquee contest is in Virginia, where polls show Democrat Ralph Northam has a slight edge over Republican Ed Gillespie in a nasty governor's race that will offer clues about the country's political mood.

Gillespie, a Washington lobbyist and former Republican National Committee chairman, has kept his distance from Trump but embraced the president's combative campaign style with hard-edged ads hitting Northam on divisive issues such as immigration, gang crime and Confederate statues.

The ads put Northam, the state's lieutenant governor, on the defensive and helped Gillespie gain ground in opinion polls in recent weeks in Virginia, where Democrat Hillary Clinton beat Trump by 5 percentage points last year.

A Gillespie win would be the latest in a series of setbacks for Democrats, who suffered losses in four contested congressional special elections earlier this year despite grassroots liberal enthusiasm for resisting Trump.