Republican Ed Gillespie and Democratic Lieutenant Governor Ralph Northam are running in this year's closely watched race for Virginia governor. (Claritza Jimenez/The Washington Post)

The Democratic National Committee gathered here over the past week with one worry on every activist’s mind: We’d better not lose the Virginia governor’s race.

It’s a surprising case of the jitters over a place that hasn’t elected a Republican to statewide office in eight years — and that voted resoundingly against Donald Trump last year. But nationally, Democrats haven’t won a marquee race since losing the presidency. They lag Republicans in fundraising. A loss for Lt. Gov. Ralph Northam against Republican Ed Gillespie on Nov. 7 could stir doubts about message and strategy just as the party is gearing up nationally for next year’s all-important midterm elections.

“We’re Ground Zero,” Susan Swecker, chairwoman of the Democratic Party of Virginia, said inside the Bally’s casino here, where party leaders and activists from all 57 states and territories gathered over the past few days. “All eyes are on us. I can understand that, because last year broke my heart.”

Less clear is whether the jitters will help — or whether a Northam victory gives Democrats any kind of road map for 2018. Leaders and activists spent a lot of time in Las Vegas talking about Nevada and Virginia, two increasingly urban and diverse states that bucked 2016’s Trump wave, as models for what every state party could achieve if they organized and elevated their activist base.

They spent less time talking about Trump’s winning message on jobs and fairness, or the states where it was so effective, or how to win in those places with a sales pitch of their own.

Former president Barack Obama joins hands with the Democratic candidates for statewide office in Virginia’s Nov. 7 election. From left: lieutenant governor candidate Justin Fairfax; Attorney General Mark Herring, who is seeking reelection; and Lt. Gov. Ralph Northam, who is running for governor. (Alexa Welch Edlund/AP)

“From a branding perspective, we have a huge problem,” said Ken Martin, the chairman of Minnesota’s Democratic Farmer-Labor Party. “It was the biggest challenge for us in the last year — and our biggest mistake was uniting around ‘Stop Trump.’ ”

Defeat in Virginia could also prompt another brawl between progressive activists and the party’s establishment. Northam, backed by most of Virginia’s elected Democrats, won his nomination over Sen. Bernie Sanders-backed former congressman Tom Perriello — a race that some activists saw as a replay of the 2016 Democratic presidential primaries.

Northam’s defeat would let activists argue that the party that picked Hillary Clinton over Sanders (Vt.), and Tom Perez over Sanders-backed Rep. Keith Ellison (Minn.) for Democratic National Committee chairman in February, had once again bet against progressives and lost. It would set the stage for more infighting in 2018.

Ideology aside, most party leaders seemed bent on avoiding in Virginia the kind of overconfidence they say settled in near the end in 2016, when many Democrats assumed that Clinton would win the presidency.

“That sense of complacency led people to take their foot off the gas,” Martin said. “We saw a dip in volunteers in the last few weeks, turnout dropped. That can’t ever happen again.”

Perez went further, rebuking Democrats who believe Virginia is now solidly, safely, permanently blue after years of population growth in the diverse suburbs of Washington. “I hear ‘demographics is destiny’ and it’s nails on a chalkboard to me,” the DNC chairman said at a session here over the weekend. “Demographics is not destiny. Organizing is destiny.”

Northam, a former Army doctor and pediatric neurologist, is in a neck-and-neck race with Gillespie, a former lobbyist and GOP strategist. There are a number of reasons to wonder whether Democrats can retain the executive mansion, which Terry McAuliffe now occupies.

Virginia gubernatorial candidate Ed Gillespie is a former chairman of the RNC and a former lobbyist. (Steve Helber/AP)

The DNC began pouring resources into Virginia in July, spending $1.5 million up front to hire 40 staff members. In addition, national staff members were loaned out to run communications for campaigns down the ballot. The party paid for direct mail to nonwhite voters; DNC Hispanic Media Director Francisco Pelayo and party operative Andrea Peoples were tasked with outreach to Latino and black female voters.

But they’re doing it with less money than the Republican National Committee. The DNC raised $4.4 million in August and spent slightly more money than it took in. As of last month, its debt — $4.1 million — was almost twice the size of its cash reserves. The RNC, meanwhile, reported $45.9 million in the bank and no debt. With less fanfare than the DNC, it has spent $3 million in Virginia, helping fund 80 staff members on the ground for Republican campaigns.

“The RNC never left Virginia and has had field staff on the ground since 2013,” said RNC spokesman Michael Ahrens.

The Northam-Gillespie race has heated up in the last month, as Gillespie, who once urged his party to moderate on immigration, launched half a dozen TV and radio ads warning that Northam would leave Virginia vulnerable to the Central American gang MS-13 by refusing to ban “sanctuary cities” with policies of protecting illegal immigrants and not cooperating with federal authorities to deport them. (Virginia does not have sanctuary cities.)

Democrats have jumped at the chance to link Gillespie with Trump.

“We’ve got an opponent who’s running a Donald Trump-style campaign,” Sen. Tim Kaine (D-Va.) said in a video message to the gathering in Las Vegas.

“We’ve watched a Republican nominee for governor run racially tinged ads that play on our fears,” said former attorney general Eric H. Holder Jr. Former president Barack Obama delivered a similar critique of Gillespie at a Northam rally in Richmond last week.

But the party’s broader strategy for winning in states Trump won has been less of a focus.

Democrats believe Trump would have lost the White House last year had he not stolen the mantle of populism, a traditionally Democratic message. But there was not much soul-searching about messaging among those who convened in Las Vegas. There was no debate about the “identity politics” that the party’s critics accused them of embracing in 2016, and little discussion of how to communicate differently in the states that supported Trump last year.

Instead, party leaders focused heavily on organizing and engaging the base.

The DNC, for instance, is looking at Virginia and New Jersey, the other state with a governor’s race next month, to test new voter outreach technology. In an interview, DNC Chief Technology Officer Raffi Krikorian said the party had deployed Facebook messenger bots, texts to likely voters, and tactics for encouraging volunteers to turn their own social-media contacts into voters.

“My team’s focus is on how we get tools in the hands of activists and state parties,” Krikorkian said. “We’re seeing if we can leverage friends effectively. Instead of doing canvassing on a geographic basis, what if we start with your circle of friends?”

The year so far has frustrated Democrats trying to turn Trump’s high disapproval ratings, and the burning energy of political activists, into votes. Democrats have over-performed in a series of special legislative races. And the DNC is helping Washington Democrats ahead of a Nov. 7 special election that could flip the state’s Senate from red to blue. But the investments haven’t yet paid off with victories. The DNC spent $2 million and hired 10 staff members to boost Jon Ossoff’s campaign for a House seat in suburban Atlanta — a historically expensive race that Republicans ended up winning.

In interviews, state party leaders said they have spent the year rebuilding. Jane Kleeb, the chairwoman of Nebraska’s Democrats, assembled a list of the state’s Democratic officeholders because none existed. Stephen Webber, the chairman of Missouri’s Democrats, told a Midwestern caucus meeting that his party had developed a message for rural counties “where we used to win 60 percent of the vote and now barely win 15 percent” — a populist campaign against corporate farming conglomerates.

An additional challenge as 2018 approaches is keeping the battles inside the party at bay.

In Las Vegas, some Democrats remained committed to those battles. For the first two days of a four-day meeting, much of the news coverage focused on a conflict over the list of the party’s at-large membership, which included several lobbyists; at a Friday meeting, the resolutions committee put the party on record against any donations from people who represent corporate interests that the party opposes.

But for most Democrats, the best way to stave off another round of infighting is to win.

Said Holder: “Now is not a time for our party to be beholden to ideological litmus tests. We’re held together by common interests.”