Get ready for a monster-sized popcorn fest. Next week, Virginia voters go to the polls to elect a new governor, an election that Democrats expected to win handily just a few weeks ago. Ralph Northam would ride a big wave in northern Virginia as a rebuke to Donald Trump by painting Republican contender Ed Gillespie as a racist, ensuring an easy win on Tuesday.

Instead, Northam finds himself being painted as a racist — by his own ideological allies. Democracy for America, the activist group founded by Howard Dean, announced yesterday that they would refuse to support Northam for his remarks about sanctuary cities, calling them “gutless” and “morally debased.” They also attacked Northam for issuing literature aimed at the more conservative areas outside of NOVA that omitted his African-American running mate:

Democracy for America (DFA) announced in a statement that it would no longer mobilize voters in Virginia to vote for Northam, and instead would focus on down-ballot races. …

“Ralph Northam’s gutless, politically senseless, and morally debased decision yesterday to openly backtrack on his commitment to standing up for immigrant families is a picture-perfect example of why Democracy for America never endorsed him in the primary and focused the entirety of our efforts in Virginia on down-ticket races, like Justin Fairfax’s campaign for Lieutenant Governor.  It’s also why, today, we’re announcing that we will no longer do any work to directly aid Northam’s gubernatorial efforts,” DFA Executive Director Charles Chamberlain said in a statement. …

They also criticized the decision by the Virginia Democratic Coordinated campaign to leave Justin Fairfax, a candidate for Lt. Governor, off of literature given to canvassers.

“Following that racist action, we decided to remove Northam’s name from the tens of thousands of volunteer Get-Out-the-Vote calls our members are making in Virginia, but, for the sake of Democratic comity, we refrained from publicly discussing that decision,” the statement continued referencing the lack of Fairfax’s name on literature.

The catalyst for this announcement was a reversal on sanctuary-city policies that suggest Northam might have been getting desperate. Until Wednesday, Northam had insisted that sanctuary-city policies were a non-issue in Virginia, after voting against a previous bill that would have blocked cities from adopting them. Northam refused to say in a debate with Gillespie that he’d sign or veto a similar bill in the future. With Gillespie closing the polling gap, Northam’s position on the issue suddenly got a lot more … nuanced:

Northam, Virginia’s sitting lieutenant governor, has insisted he opposes sanctuary cities while also accusing Gillespie of fabricating the issue for political advantage.

But in an interview Wednesday with the Norfolk TV station WAVY, Northam said for the first time that, under certain circumstances, he would sign a bill similar to the one he voted against this year, a vote that spawned a wave of ominous ads from the Gillespie campaign linking Northam to the Latino gang MS-13.

“If that bill comes to by desk … I sure will. I’ve always been opposed to sanctuary cities. He knows that,” Northam said of Gillespie, whose MS-13-themed ads have been blasted by critics as racially tinged.

Gillespie issued a statement that he “sincerely hope[s] that this change of heart is real,” but he’s probably more sincerely hoping for exactly this outcome. Northam had tried to play both sides of the issue by remaining silent on it, but the tightening race forced him into choosing a policy. It’s curious that he chose to oppose sanctuary cities, especially after his nay vote on the bill just eight months ago. Northam wasn’t going to gain any credit in ROVA for that shift, and he’s lost significant cred in NOVA where he needs to run up the numbers.

One national Democrat is none too happy with DFA’s actions, however:

Dean founded DFA in 2004, when Democrats still had some reasonable claim to the center of American politics. Since then, their ideological pole has swung wildly to the Left, and their focus far more on identity politics over policy or even tactical thinking. This is the activist base now, not in 2004 — and yes, it gets incredibly stupid and deeply discrediting at times, although this may not be one of those instances.

So where does the race stand now? After a spate of mid-October polling that gave Gillespie some leads, it seems to have reverted back somewhat to a narrow Northam lead. The RCP aggregate gives Northam a 3.6-point average lead, but that includes an outlier from Quinnipiac that had Northam up seventeen points. Gillespie has a track record of outpacing the polling in Virginia, which means that the race has probably always been closer than it seems. This late eruption of a civil war among Democrats in Virginia will likely depress their turnout even further, and might have given Gillespie the edge for a win on Tuesday.