Virginia Democratic gubernatorial contender Ralph Northam, who called President Trump a "narcissistic maniac" during his primary race, released a new commercial Tuesday that strikes a softer tone.

"As a doctor, nobody ever asks if I'm a Democrat or a Republican. They just want my help," Northam, the sitting lieutenant governor and a pediatrician, says to the camera. "So if Donald Trump is helping Virginia, I'll work with him. But Donald Trump proposed cutting Virginia's school funding, rolling back our clean air and water protections, and taking away healthcare from thousands of Virginians. … I've stood up to Donald Trump on all of it. Ed Gillespie refuses to stand up to him at all."

Republicans labeled the change as a major flip-flop, but political observers say it's no surprise. Candidates are sharper in addressing activists likely to vote in primaries, and generally tack to the center with general election audiences.

[Interested in Virginia’s governor’s race? Join our Facebook group]

"This is Politics 101," said Stephen Farnsworth, a political scientist at the University of Mary Washington. "It seems to me that the people opposed to Donald Trump are already pretty motivated to turn out in this election...It makes sense for Northam to try to expand his support to those voters who are undecided with a more genial approach."

Asked why he dropped "narcissistic maniac" from his lexicon, Northam offered a less calculated reason.

"I think people already know and they are judging for themselves," said Northam at a recent campaign event in Arlington. "What we are talking about as we move forward are the policies that are coming out of Washington that are so detrimental to Virginia like the travel ban and pulling away from the Paris (climate) accords."

Polls have shown Trump is deeply unpopular in Virginia. But after he pulled off an upset victory over Hillary Clinton in November, Democrats have debated whether they ran too hard against Trump at the expense of offering voters a reason to vote for Clinton.

Northam's communications director said the campaign wasn't necessarily heeding the lessons of the 2016 presidential race.

"What we have been focused on throughout the election is how Donald Trump would specifically hurt Virginia," said David Turner. "What voters care about- they care about policies that would hurt Virginia."

But a Gillespie spokesman said Northam's changing tone on Trump reflects a fickle candidate.

View Graphic Virginia general election guide

"He changes his positions daily, doesn't put forward any real policy proposals, and is largely invisible on the trail," said Dave Abrams, the spokesman. "It's becoming a Seinfeld episode: a campaign about nothing."

Gillespie, who has been trying to attract Trump voters without repelling moderates, has embraced the president more in the general election than during his primary contest. And he has tried to use Northam's signature line about Trump against him. At their first debate in July, the former Republican National Committee chairman questioned how Northam would work be able to work with the federal government.

"What are you going to do — call the White House, 'Please put me through to the 'narcissistic maniac'?" Gillespie said.