Nearly four months after a former congressman from Charlottesville shocked the political establishment by jumping into the race for governor of Virginia, state Democrats are locked in a contest that they didn’t want but that the whole country is watching.

On Saturday, the two candidates vying for the Democratic nomination meet in their first debate ahead of the June 13 primary. Lt. Gov. Ralph Northam, who spent years laying the groundwork for this run, will square off in Fairfax against challenger Tom Perriello, who has taken the mantle of Sen. Bernie Sanders (I-Vt.) and others looking to reinvent the Democratic brand.

Early polls show the two candidates running about even — a measure of the force with which Perriello has disrupted Northam’s plans. Yet most Virginians don’t know much about either man and have yet to make up their minds, which makes Saturday’s debate a crucial chance to define the race.

Perriello has capitalized on national Democrats’ anxiety about reclaiming relevance and defying President Trump. He has drawn most of his money from outside Virginia, including a massive stake from billionaire George Soros, and picked up endorsements from the leaders of the wing that believes the party must be more populist and progressive — notably Sanders and Sen. Elizabeth Warren (D-Mass.).

[‘Dark money’ vs. corporate cash: Va. Democratic rivals clash over funding]

“My guess is that there is an audience for this message right now — there certainly is one nationally,” said Bob Holsworth, a longtime Virginia political analyst. “It’s the argument that the system is rigged . . . that both Donald Trump and Bernie Sanders articulated during the [presidential] campaign. Perriello has embraced that.”

This has cast an unflattering light on what had seemed to be Northam’s strengths — his calm demeanor, his record of working in the Republican-controlled legislature, even his rural Virginia drawl.

But Northam boasts some advantages. He has the support of every Democrat in the General Assembly and of Democratic Sens. Mark R. Warner and Tim Kaine, who will help roust voters for the primary, which is likely to see low turnout. And despite Perriello’s rapid fundraising — he pulled in a field-leading $2.2 million between January and March — Northam has more cash on hand (over $3 million) and has already begun TV advertising.

The two candidates are strikingly similar in their policy positions, so for Democratic primary voters, the deciding factors may be style and background.

Northam, 57, is a pediatric neurologist from the Eastern Shore town of Onancock. He graduated from the Virginia Military Institute and, as an Army major, treated wounded soldiers during Operation Desert Storm.

He won election to the state Senate in 2007 and was reelected in 2011, then won the statewide election to become lieutenant governor in 2013.

Northam sometimes takes heat for confessing that he voted for George W. Bush for president — twice — and because state Republicans tried to woo him to switch parties in 2009 in a bid to gain control of the Senate.

But Northam developed a staunch record on Democratic issues, especially health care. He led efforts to pass a smoking ban in Virginia restaurants and skewered Republican efforts to require women to get a transvaginal ultrasound before obtaining an abortion.

Perriello, 42, grew up outside Charlottesville and got his undergraduate and law degrees from Yale. He won election to Congress in 2008, representing the conservative 5th District. During his single term, he won stature within the party for supporting the Affordable Care Act despite his conservative constituency.

But Perriello also has drawn fire from liberals for advocating an amendment to the ACA that would have prevented federal subsidies for insurance plans that cover abortion and for winning an “A” rating from the NRA by, in part, resisting an assault weapons ban. Perriello has since apologized for the abortion vote and now refers to the NRA as a “nut-job extremist organization.”

After he lost his congressional seat, partly because of his support for Obamacare, Perriello had prominent roles at the Center for American Progress, a left-leaning think tank. His friendship with Obama led to appointments in the State Department, including a diplomatic posting in Africa.

Perriello has used his youth and his social media savvy to stir up Democrats who felt shocked by Hillary Clinton’s defeat last year. His populist message, perhaps the most strident of any Virginia Democrat since Henry Howell in the 1970s, has packed town hall meetings.

But Perriello is no Sanders-like rabble-rouser. He reads his crowds, he absorbs information quickly, and he formulates cogent arguments heavy on anti-Trump defiance.

Northam is actually more likely to shout to a crowd, but he struggles to seem natural in front of a large group. His demeanor is better suited to small interactions — the bedside manner of a country doctor, or the chumminess of a legislator who might be able to broker a deal with the other side.

It’s this difference of approach that highlights the choice Democrats will have to weigh in Saturday’s debate, and plays out most strikingly in how the two candidates talk about the economy.

Virginia has low unemployment — 3.8 percent — but is pockmarked by wildly uneven prosperity. Coal towns in Southwest and urban housing projects in Norfolk or Richmond suffer deep poverty, while the vast Northern Virginia suburbs are among the wealthiest places in the country. Even those, though, have seen a loss of high-paying jobs and are threatened by an overdependence on government-related industries.

Both candidates emphasize the issue. But Perriello is more likely to use the language of working-class angst, while Northam talks of economic opportunity.

“It is clear that Perriello has embraced what I would call the populist position, whereas Northam has adopted a sort of more conventional Democratic stance, where he is progressive on social issues but sort of mainstream on economic matters,” Holsworth said.

For instance, Perriello has proposed free community college. Northam has also proposed two years of free community college — but would then have recipients spend two years working in community service.

Both candidates support a $15-an-hour minimum wage, but Perriello has also called for universal pre-K and eight weeks of guaranteed leave for workers at two-thirds pay to care for a new child or a sick family member.

Northam’s take is more cautious: efforts to “expand early education” and a tax credit to enable employers to afford eight weeks of paid leave.

Perriello’s approach may be what voters want to hear, Holsworth said, but Northam’s is more pragmatic. “Perriello is not going to beat Northam on the grounds of what he can do with the General Assembly, and one would think . . . some of the populist economic positions he’s taken are likely to be more symbolic than real,” Holsworth said.

Another area of sharp difference involves two oil and natural gas pipelines being planned in rural parts of Virginia. Perriello is against them, period. Northam won’t disavow the pipelines — which his patron, Gov. Terry McAuliffe (D), has touted as a big source of jobs — but says they must be subjected to strict environmental review.

That’s about as far apart as they get on any issue, which has delighted a Republican opposition that sees the Democratic primary tacking farther and farther to the left.

“It’s just different shades of gray,” said political analyst Geoffrey Skelley of the Universtity of Virginia Center for Politics, who then corrected himself: “Or different shades of blue, there you go.”

Republicans have a June 13 primary battle of their own among former Republican National Committee chairman Ed Gillespie, Prince William County Supervisors Chairman Corey Stewart and Virginia Beach state Sen. Frank Wagner. The winners will square off in November.

Northam and Perriello will debate Saturday at 6 p.m. at Lanier Middle School in Fairfax.