Updated

Democrats have worked feverishly all year to make nearly every local election a referendum on President Trump – and Tuesday's gubernatorial races are no exception.

The Trump factor looms large in the marquee Virginia gubernatorial race, where Democratic Lt. Gov. Ralph Northam and his allies have churned out mailers and ads tying Republican rival Ed Gillespie to the Trump White House at every turn.

The Trump-referendum strategy has not been particularly successful for Democrats in the House special elections so far this year. But this time, polls in New Jersey and Virginia’s gubernatorial races show the Democratic candidates in the lead.

In New Jersey, Democratic nominee Phil Murphy holds a substantial lead over Republican Kim Guadagno.

But the race in Virginia is considerably tighter. According to the latest Fox News Poll released Monday, Northam holds a 5-point edge over Gillespie, who says there is “no doubt” the polls are close.

In the final stretch, Gillespie questioned whether the Democrats' Trump-all-the-time strategy is a sound one.

FOX NEWS POLL: VIRGINIA GOVERNOR'S RACE REMAINS TIGHT

“They’ve known they’re in a close race for some time. They’ve been throwing the kitchen sink at us with awful and vile ads,” Gillespie said on Fox News’ “Daily Briefing” Monday.

The most controversial of those ads was run by a Democratic group, Latino Victory Fund. It showed minority children seemingly being chased by a driver in a pickup truck, decked out with a Confederate flag and a “Gillespie for governor” bumper sticker. The ad concluded with a scene of a Charlottesville-like rally, with a narrator asking: “Is this what Donald Trump and Ed Gillespie mean by the ‘American Dream?’”

The ad was removed after extensive backlash.

ELECTION DAY 2017: FULL COVERAGE

Other mailers boast that Northam is "standing up to Trump and Gillespie's politics of fear and hate."

MAILER VIRGINIA

This is one of numerous mailers from Virginia Democrats trying to link Republican candidate Ed Gillespie to President Trump.

It's a message the campaign stands by as polls open.

“Independent groups are denouncing Ed Gillespie because he has run the most divisive, fear-mongering campaign in modern history,” Northam campaign spokeswoman Ofirah Yheskel said in a statement to Fox News. “It is not shocking that communities of color are scared of what his Trump-like policy positions mean for them.”

Northam has campaigned with Democratic power players like former President Barack Obama and former Vice President Joe Biden and even had a fundraiser headlined by Hillary Clinton.

WHO ARE ED GILLESPIE AND RALPH NORTHAM?

Meanwhile, Gillespie has garnered Republican support, with a fundraiser hosted by former President George W. Bush. He was joined by Vice President Pence on the campaign trail—but not Trump. Trump, though, has repeatedly expressed his support for Gillespie on Twitter.

"The state of Virginia economy, under Democrat rule, has been terrible. If you vote Ed Gillespie tomorrow, it will come roaring back!" Trump tweeted Monday.

Despite Democrats' claims, Gillespie seems to be keeping a certain distance from Trump, while telling Fox News that he would work with “President Trump and Vice President Pence and the Cabinet.” He listed priorities for Virginia, like “building more ships” and “keeping Norfolk the largest base in the world.”

“In terms of working with the president and vice president, any governor of Virginia has to be able to work with the president of the United States,” Gillespie said Monday. “That’s always been our history given our proximity. I’ll be able to.”

NJ1

In New Jersey, Democratic nominee Phil Murphy holds a substantial lead over Republican Kim Guadagno. (AP, File)

In New Jersey, Lt. Gov. Guadagno is dealing not only with attempts to link her to Trump but to outgoing and controversial Gov. Chris Christie.

Murphy, a multimillionaire former Goldman Sachs executive and former U.S. ambassador to Germany, said the choice for New Jersey’s next governor couldn’t be clearer.

“On the one hand more of the same, another Chris Christie four years of failed politics, of failed politices for the middle class that was hollowed out and ravaged, where public education doesn’t get funded, infrastructure is ignored, we become more unfair by the day and we are caught in this awful us vs. them vortex,” Murphy said at a recent campaign event. “Or we can turn the page and change.”

Guadagno’s response? She reminds voters that Christie is no longer on the ballot.

Murphy, like Northam, also has welcomed big names on the campaign trail, with former Presidents Obama and Bill Clinton, and Biden, at campaign events.

There is much at stake in both gubernatorial elections, but whoever takes the governor’s mansion in New Jersey could have the added responsibility of appointing a senator—if Sen. Bob Mendendez, D-N.J., is convicted in his corruption trial and resigns.

Menendez maintains his innocence. But if he were to step down, the appointment decision would have serious implications for Trump's policy agenda in a closely divided Senate.

“With the Senate so evenly divided, the outcome of the New Jersey gubernatorial election, if Senator Menendez were to be convicted, could determine the Trump agenda and if it would move forward with greater ease in the Senate," said Brigid Harrison, a professor of political science and law at Montclair State University.

Another race to watch Tuesday is in Utah, with the election to fill the House seat previously held by Republican Rep. Jason Chaffetz who resigned from his post in June.

Fox News' Eric Shawn contributed to this report.