— -- Voters head to the polls Tuesday in Virginia to decide their next governor in a race that has been closely watched as a bellwether for the 2018 midterm elections and a test of President Donald Trump’s influence in the only Southern state he lost in 2016.
The race between Lt. Gov. Ralph Northam, a Democrat, and former Republican National Committee Chairman Ed Gillespie started out as a relatively tame political contest between two moderates but has morphed into an intense battle over hot-button issues like illegal immigration, race relations and Confederate monuments.
Since 2001, Republicans have won just one out of the four gubernatorial elections in Virginia, and national groups have poured money and resources into the state to boost Gillespie’s campaign. Trump did not campaign with Gillespie, but Vice President Mike Pence appeared with the candidate last month at a rally in southern Virginia.
Northam has attracted support from national Democrats and appeared on the campaign trail with former President Barack Obama and Vice President Joe Biden. Democrats are eager to pull out a win in Virginia as a tangible show of political resistance to the Trump presidency.
Here’s a look at what you need to know about who is running and what matters in Tuesday’s election:
Northam, Virginia’s Democratic lieutenant governor, grew up on Virginia’s Eastern Shore and attended the Virginia Military Institute. He later served as an Army doctor and taught medicine and ethics at Eastern Virginia Medical School.
He was elected lieutenant governor in 2013, serving under current Gov. Terry McAuliffe.
This year he faced a strong primary challenger in former U.S. Rep. Tom Perriello but was able to win the nomination with help from McAuliffe and Democratic groups in the state.
Gillespie has been in Republican Party politics for decades, having served as a Republican National Committee chairman and counselor to President George W. Bush. Gillespie has also worked as a lobbyist and political strategist. In 2000 he co-founded a consulting firm, Quinn, Gillespie & Associates.
Gillespie ran for the Senate in 2014 and nearly unseated incumbent Mark Warner, a Democrat. Gillespie lost the election by less than 1 point in a result that caught many political observers off guard.
In this year's Republican primary, Gillespie was nearly beaten by Prince William County Board of Supervisors Chairman Corey Stewart, who ran as a more conservative and Trump-aligned candidate.
The Trump question
Trump did not campaign for Gillespie but has loomed large over the race.
The president endorsed Gillespie over Twitter, praising his ads highlighting violence perpetrated by the MS-13 gang in Virginia.
Gillespie approached questions about Trump very cautiously throughout the campaign, but Northam, who called Trump a “narcissistic maniac” early in the campaign, has tried to tie Gillespie to him at every turn. The president’s approval rating in Virginia was just 34 percent in a recent Quinnipiac poll.
Northam has run ads in the final weeks of the campaign linking Gillespie to Trump, likely in the hopes that the unpopular president will be enough of a drag in certain areas of the state for Northam to pull out a win.
The ad wars
Most of the campaign’s most heated exchanges have come over the airways.
Gillespie has run ads highlighting crimes committed by the violent MS-13 gang, accusing Northam of supporting policies that have allowed the gang to grow in the state. The Republican has also run ads highlighting Northam’s support for the automatic restoration of certain rights for criminals, saying the policy allows sex offenders to have their gun rights restored.
Gillespie has also tried to use the controversy over Confederate monuments to his advantage, running ads saying the monuments will “stay up” if he is elected and hitting Northam for saying he would take steps to remove some statues.
While Northam has largely attacked Gillespie over his lobbying career, a mailer sent out by the state’s Democratic Party linked Gillespie and Trump to white nationalist protesters and the surrounding chaos over the summer in Charlottesville, according to The Washington Post.
Just last week, an outside group called Latino Victory Fund ran an ad featuring a pickup truck with a Confederate flag and Gillespie bumper sticker menacing young minority children. The Gillespie campaign called the ad “vile” and “an attack on all Virginians.”
The Northam campaign did not condemn the ad.
“It is not shocking that communities of color are scared of what his Trump-like policy positions mean for them," campaign spokesman Ofirah Yheskel and told ABC News in an email.
The group pulled the ad after eight people were killed in New York City after a truck attack that targeted cyclists and pedestrians.
Looking to 2018
With the largely uncompetitive New Jersey gubernatorial race the only other statewide election tomorrow, Virginia will be looked at as the best political barometer before the 2018 midterms.
Republicans have a much more favorable map when it comes to Senate races, as Democrats are defending 23 incumbents’ seats and two independent seats with members who caucus with them. Republicans, by contrast, are defending just eight seats.
The last year a Republican was elected governor of Virginia was 2009, when Bob McDonnell defeated Democratic state Sen. Creigh Deeds.
With Trump’s effect on the 2018 midterms still largely a question mark, the Virginia race will give both parties an early look at how they should approach key races across the country.
Join us Tuesday for Your Voice, Your Vote 2017, our live coverage of the biggest races of the year and a look back on the one year anniversary of Trump’s election. Starting at 7:30 pm ET, ABC News will be covering all the races - including the big contests in Virginia and New Jersey - livestreaming on ABCNews.com/LIVE and on ABC News’s Facebook and YouTube pages, plus OTT platforms including Apple TV and Roku.