(Bloomberg) -- Democrat Terry McAuliffe distanced himself from President Joe Biden earlier this month in a bid for more votes in the closely fought Virginia governor’s race, prompting some sharp retorts from the White House.

Now, as polls show a toss-up contest with Republican rival Glenn Youngkin, McAuliffe is counting on the power of the presidency to give him an edge in the Nov. 2 vote, planning an appearance with Biden on Tuesday, a week before the election.

Their joint appearance comes just weeks after he blamed Biden’s sagging approval ratings for his own slump in the polls. McAuliffe, a former Virginia governor is locked in a dead heat with Youngkin, a former co-chief executive officer of Carlyle Group Inc. Casting Biden as a headwind for his campaign fueled tensions between McAuliffe, a former chair of the Democratic National Committee, and the White House.

The race for governor has drawn national attention as a bellwether for the 2022 congressional mid-term elections. Democrats currently hold a razor-thin majority in both chambers. Biden carried Virginia by 10 points last November, so a McAuliffe loss would be a devastating blow just as Biden is trying to get his signature spending package through Congress. 

“It’s a sunk cost,” Democratic strategist Stu Loeser said. “A loss is going to be blamed on him, rightly or wrongly, so he’d better do everything he can to make sure he owns a win, too.”

Biden and McAuliffe will appear at Virginia Highlands Park in Arlington around 8 p.m. The event in the Washington suburbs highlights the battle between Youngkin and McAuliffe for the suburban voters who have trended Democratic in recent years out of dislike for Donald Trump. 

McAuliffe has called on high-profile friends during the state’s 45-day early voting period, including former President Barack Obama, Vice President Kamala Harris, former Georgia gubernatorial candidate and voting rights activist Stacey Abrams.

Harris is scheduled to appear with McAuliffe again on Oct. 29 in Norfolk. That event is set to feature musician Pharrell Williams, according to McAuliffe’s campaign. Senator Cory Booker, a New Jersey Democrat, is slated to campaign with McAuliffe Wednesday. 

But Biden  hadn’t been joined by Biden since an event in Arlington in July which attracted nearly 3,000 people.

Before renewing his embrace of the president, McAuliffe tried to distance himself from the party he once led, casting its lawmakers and Biden as a liability. 

“We are facing a lot of headwinds from Washington,” McAuliffe said at an Oct. 5 virtual rally.  “As you know, the president is unpopular today, unfortunately, here in Virginia, so we’ve got to plow through.”

The White House pointed to Biden’s endorsement of McAuliffe at the July rally and said that the president is focused on passing his legislative agenda through Congress. 

Secretary Jen Psaki rebuffed McAuliffe’s assertion in response to a question about the comments during an Oct. 8 briefing with reporters. 

“Well, if you just look at facts and the polling the president is the most popular figure in Virginia of anyone currently running for president or any former recent president,” Psaki said. 

Psaki said that Biden’s legislative agenda, including addressing child and elder care, as well as infrastructure, is also popular, saying “that’s probably the reason why former Governor McAuliffe is also running on that agenda.” 

In another Oct. 14 White House press briefing, Psaki said that Biden wants McAuliffe to win, but that off-year elections are “often not a bellwether” for national contests. 

Psaki was asked in an Oct. 18 press briefing whether the president would consider McAuliffe’s advice to get his infrastructure bill passed by gathering lawmakers in one room and saying they can’t leave until a deal is done. 

“The president’s been doing this a while, 36 years in the Senate, with all due respect, for the recommendations of anyone outside, and he’s going to continue to work with Democratic leadership about having the kinds of meetings and engagements that will help move this across the finish line,” Psaki said. 

Republican strategist Tucker Martin said that McAuliffe was wagering that campaigning with Biden would help generate more enthusiasm than it would turn off any voters who are unhappy with the president.

“It’s kind of a calculated risk that you take this close to the end of a campaign,” he said. 

Youngkin is taking a different tack, doing a 10-day bus tour to 50 spots around the state. His campaign is seeking to draw a contrast with McAuliffe’s high-profile surrogates by featuring speeches by everyday supporters at his rallies, though Youngkin did campaign earlier this year with former Vice President Mike Pence, Trump’s Secretary of State Mike Pompeo, former South Carolina Governor and Ambassador to the United Nations Nikki Haley, and Texas Senator Ted Cruz, among others. 

But Virginia Democratic strategist Jesse Ferguson said that Biden’s appearance will indirectly raise the question of Youngkin’s relationship with Trump. The former president has repeatedly endorsed Youngkin, but he has not campaigned for him in person in Virginia, something that McAuliffe has repeatedly dared him to do.

“President Biden being in Virginia raises a question about Trump being the man behind the curtain in the Youngkin campaign,” he said.

(Updates with Harris, Booker campaigning with McAuliffe in 19th paragraph)

©2021 Bloomberg L.P.