The political crisis in Virginia threatens to turn a state that has trended Democratic back into a battleground, a development that could complicate the party's effort to defeat President Donald Trump next year.

Three of the state's top Democrats are engulfed in a scandal that has shaken the state government. Gov. Ralph Northam and Attorney General Mark Herring have admitted wearing blackface as young men in the 1980s. Lt. Gov. Justin Fairfax, meanwhile, has been accused of sexually assaulting a woman in 2004, an allegation he denies.

The men are resisting calls for their resignation.

Virginia's increasingly diverse and urban population has fueled Democratic victories at the state and presidential level for a decade. But Democrats are anxious that the dizzying developments could suddenly halt their progress. The prospect of losing Virginia's 13 electoral votes would spread Democrats thin as they try to win back upper Midwest states that voted for Trump while making a push in GOP-leaning states like Georgia and Arizona.

"This doesn't change the blue direction of the state long-term, but this certainly complicates things for Democrats in the immediate future," said Virginia native Carolyn Fiddler, a top operative at the DailyKos website, a force in liberal politics nationally. "Everyone, presidential candidates, Democratic candidates here and everywhere, are going to have to wrestle with this."

Josh Schwerin, who worked for Northam's predecessor, Democratic Gov. Terry McAuliffe, said, "Voters could take this out on Democrats ... less as an ideological shift but more as an issue of repercussions for genuine political scandal."

The president himself gleefully agreed, predicting in a tweet Thursday that he will reclaim a state he lost by 5 percentage points to Hillary Clinton in 2016. "Democrats at the top are killing the Great State of Virginia," he tweeted Thursday. "If the three failing pols were Republicans, far stronger action would be taken. Virginia will come back HOME Republican) in 2020!"

Trump's taunt ignores his own history of sexual assault allegations and his contorted relationship with race, including when he insisted after a 2017 white supremacist rally in Charlottesville, Virginia, that there were "very fine people on both sides" of an encounter that left a counterprotester dead.

Virginia's booming population -- particularly around Washington -- has given Democrats sweeping gains in recent cycles. President Barack Obama twice won the state after four decades of GOP dominance. In 2016, Clinton held on despite losing nearly every other battleground state, a sign of the state's overall shift to Democrats. The party flipped state legislative seats across Virginia in 2017, while Northam, Fairfax and Herring won with surprising ease. In 2018, Democratic Sen. Tim Kaine coasted to re-election while Democratic congressional nominees ousted three GOP incumbents.

But that momentum abruptly stopped last week with the disclosure of a picture from Northam's medical school yearbook showing one young man in blackface and another in Klan regalia. Northam initially signalled that he was in the picture. He recanted a day later but admitted using blackface in the same timeframe to dress as pop icon Michael Jackson.

As the situation unfolds, the risk for Democrats isn't so much that legions of Virginia voters move to Republicans -- a party that nominated an open Confederate sympathizer to challenge Kaine last year -- or suddenly embrace Trump. But there are questions about how committed and enthusiastic that growing Democratic electorate would be if Northam, Fairfax and Herring remained in office.

AP VoteCast data, analyzing the 2018 midterm electorate, shows that black voters cast about 17 per cent of Virginia ballots in November, with about 9 out of 10 of those backing Democratic congressional candidates. Women, meanwhile, made up 52 per cent of the Virginia electorate and sided with Democrats by a margin of 20 percentage points. If those advantages shrank, while Trump was able to stoke GOP turnout, the state could suddenly return to tossup status.

Democrats in Richmond and in Washington say the next moves may largely depend on what black state legislative leaders push for. They remain publicly noncommittal.

The situation is complicated by the racial politics of the three Virginia officials at the centre of the scandal. Northam and Herring are white men approaching 60. Fairfax is a 39-year-old black man who just days ago was viewed as Northam's heir apparent -- either via the 2021 election or when Northam heeded calls to step down.

Democrats like Zac Petkanas, an operative who specializes in opposition research and offensives against Trump, say any solution must involve the resignations of all three Virginia leaders. They don't want to hand control to the Republican next in line, but they want to avoid the optics of elevating, even for a short time, a lieutenant governor accused of sexual assault or having that same official -- the lone black man among the three -- be the only one to give up his post.

"The Democratic Party has made it clear we will not tolerate racism or the way some men have treated women," Petkanas said. "They just have to do it in a smart way that respects voters' wishes that Democrats be in charge."

Fiddler added, "What I do know is that if Ralph Northam is still governor, then that means we're still talking about this -- and that (yearbook) picture is ready made for television and direct mail."

There are recent examples of controversies resulting in upsets that go against a state's fundamental bent. Heavily Republican Alabama elected Democrat Doug Jones to the U.S. Senate over a Republican nominee accused of sexually pursuing teenage girls when he was in his 30s. Louisiana chose Democrat John Bel Edwards as governor in 2015 over then-Sen. David Vitter, a Republican who'd previously been identified as a client of a high-end Washington, D.C., brothel.

If anything spares Democrats, pollster Zac McCrary said, it's Trump himself, along with Virginians' general satisfaction with the direction of their state government.

"If Ralph Northam or one of these others was on the ballot," he said, "they might have a problem. ... But it's much too alarmist (to say) that enduring this significant pain and embarrassment in February will have long-term ramifications nearly a year from now and beyond in an environment where Trump still blocks out the sun every day."

------

Associated Press writer Hannah Fingerhut contributed to this report.