Voting booths at Colin Powell Elementary School in Centreville. (Paul J. Richards/Agence France-Presse via Getty Images)

On June 13, Virginia at last arrived at the end of a long primary campaign and embarked on what promises to be a long general election campaign that will put a spotlight on the internal ideological struggles to define each party in the age of President Trump.

On the Republican side, Ed Gillespie prevailed against Trump copy-cat Corey A. Stewart and technocrat Frank Wagner in what embodied much of the Republican Party’s current struggle between moderates, nationalist populists and traditional conservatives. Wagner represented the moderate Republican branch that is steadily dwindling nationwide. Stewart embraced his role as a one-time Virginia campaign chair for Trump and ran a campaign that appealed to the deepest nationalist and populist impulses.

Gillespie was Republican voters’ choice to be the standard-bearer, even if only by a hair. Gillespie may seem like a throwback Bush-era conservative, and maybe he was in his Senate run in 2014, but he is not now. Gillespie built a large grass-roots coalition that would have been impossible for an aloof “establishment” conservative. This seems a viable compromise for traditional conservatives seeking to prevail in a Trump-oriented Republican Party.

On the Democratic side, Ralph Northam defeated Tom Perriello in a similar struggle for the soul of a party and movement. Northam prevailed by a sizable margin, but Perriello was a formidable challenger. Many Democrats are still reeling from Democratic presidential nominee Hillary Clinton’s loss in 2016. Her loss challenged the notion that moderate Democrats are more electable than progressive candidates.

We can expect that Northam, a grandfather-like figure who bears the rare mark in the Democratic Party of having voted for George W. Bush twice, will run a Clinton-like triangulation campaign that tries to appeal in style to the center while keeping the progressive left pleased.

Whether that triangulation can work remains to be seen. To win the primary, Northam embraced a variety of progressive policy positions, such as the $15 minimum wage, that may make appealing to moderate Virginians difficult.

For all the talk of the Republican Party’s soul-searching, the Democratic Party is increasingly fracturing over differences in tactics and philosophy between centrists and liberals on one hand and hard-line progressives on the other.

Democrats for now are united significantly by their disdain for Donald Trump, but can they keep a coherent vision and steady coalition with so many increasingly tense internal contradictions? And while the president keeps Democrats excited and engaged, he lacks relevance to issues important to down-ticket contenders.

The campaigns are painting each other as tied to the most extreme elements of their respective parties. Northam and the Democrats already are emphasizing areas where Gillespie agrees with Trump, amd Gillespie and the Republicans are pointing out that Northam catered to hard-line progressives to win the nomination.

Because it is one of only two states with major elections this year, Virginia has attracted national attention. The general election likely will continue to drive nationwide interest as a proving ground for elections in the Trump era.

It is clear the nationalist and populist torrents unleashed nationally in 2016 on both sides have not settled down yet. With Stewart challenging Sen. Tim Kaine in 2018 and Perriello awakening many progressives across the commonwealth, it is clear that we may see tug-of-wars in both parties for years to come.

Erich Reimer is a Virginia-based Republican Party activist and commentator.