VIRGINIA BEACH, Va. — The candidates in Virginia’s high-stakes, closely watched race for governor are in a final sprint before Election Day.

Republican Ed Gillespie and Democrat Ralph Northam crisscrossed Virginia on Saturday and Sunday trying to rally supporters while allied groups and political parties on both sides touted unprecedented get-out-the-vote efforts.

Virginia is one of only two states electing a new governor this year, and the contest is viewed by many as an early referendum on President Donald Trump’s political popularity.

Democrats are eager to prove they can harness anti-Trump energy into success at the polls, while Republicans are looking to show they have a winning blueprint in a blue-leaning state. Most public polls have shown a close race to succeed Gov. Terry McAuliffe, a Democrat who is term limited.

Northam, a pediatric neurologist and the state’s lieutenant governor, spent Saturday in voter-rich northern Virginia, where Democrats have run up huge leads in recent statewide elections. He attended rallies with union members, immigrant groups and others where he sought to use anti-Trump energy as a motivating factor.

“Do you all remember how you felt when you woke up on November the 9th of 2016?” Northam asked a group of canvassers in a supporter’s backyard in Ashburn, referring to the day after Trump won the presidential campaign. “We cannot take any chances and wake up like that again.”

Northam said he felt strong enthusiasm from his supporters and said he was heartened by the high number of absentee votes that had been cast so far compared with four years ago, particularly in Democratic-leaning areas. Northam predicted overall turnout Tuesday could surpass 50 percent, which would be a significant increase from previous gubernatorial contests.

National Democrats, still stinging from last year’s presidential race, are hoping a strong showing by Northam will help motivate the party ahead of the 2018 mid-term elections. A string of high-profile surrogates, including former President Barack Obama, have campaigned on his behalf.

Some volunteers helping Northam said Trump’s victory had spurred them to get involved in a political campaign for the first time.

“Really, a lot of us feel unsettled,” said Kee Jun, a Korean-American from Northern Virginia who helped introduce Northam to voters at a restaurant Saturday. “I feel an obligation to my children, Virginia residents and the nation.”

But some Republicans said they felt Trump’s victory has energized their party in a lasting way that will help Gillespie.

“People realize they can have a voice and can make a difference in an election,” said John Ancellotti, a retired Coast Guard captain and federal agent who attended a Gillespie rally Sunday.

Gillespie, a White House adviser to President George W. Bush and former lobbyist, has kept Trump at a distance and has not campaigned with him. But in a bid to rally Trump supporters, Gillespie has run hard-edge attacks ads against Northam focused on immigrants in the country illegally and preserving Confederate statues. The approach has drawn bipartisan criticism, but Gillespie supporters say he’s been unfairly maligned for taking positions that are popular with voters but may not be politically correct.

“Ed is willing to take those arrows,” said U.S. Sen. Tom Cotton of Arkansas, who campaigned with Gillespie on Sunday.

Former Trump strategist Steve Bannon said Saturday that Gillespie’s tack to the right will help him “pull this out,” according to the pro-Trump website Breitbart News.

Gillespie did not mention the president during Sunday rallies in Williamsburg and Virginia Beach, instead focusing his message on his plan to boost the state’s economy. He also told supporters that Democrats were “panicked” because the Republican ticket had the momentum in the campaign’s final days.

“We no longer just have momentum — we have the lead,” Gillespie said.

Republicans said a controversial last-minute ad by the Latino Victory Fund, which features a Gillespie supporter chasing down children of different minority groups in a pickup truck, has helped galvanize Gillespie supporters at a key time.

“That was God’s way of helping him,” said Robin Milewski, a York County Republican volunteer.