STERLING, VA. - OCTOBER 30: Rep. Barbara Comstock (R-Va.) stumps for Virginia’s GOP on Oct. 30 in Sterling, Va. Gillespie’s loss, part of a Democratic wave, increases Comstock’s re-election challenge next year. (Jahi Chikwendiu/The Washington Post)

One year. That's how long Rep. Barbara Comstock has to figure out how to protect herself from her constituents' disdain for President Trump, borne out by a blue wave across Virginia during Tuesday's elections.

The only Northern Virginia Republican in Congress watched her friend Ed Gillespie lose the governor's race. Next, the Democrats wiped out seven GOP-held state delegate seats with whom she shares territory.

No one who knows Comstock is counting her out — she's a relentless campaigner and operative — but as the polls closed Tuesday night, a new reality set in: She could do everything right and still lose at the hands of Democratic voters bent on defeating anyone who shares a party affiliation with Trump.

"If I'm Barbara Comstock, I'm very worried, absolutely," Virginia Gov. Terry McAuliffe said in an interview during the Democrats' election night celebration. "Look at the turnout! I think every Republican is on notice tonight. This is what Donald Trump has done to their party."

Comstock's campaign points to her six-point win last year while sharing a ballot with Trump as evidence of her staying power. She also won more votes in 2016 in precincts that overlap with six of her GOP House of Delegates colleagues than they did Tuesday, according to her campaign. "Democrats have continually underestimated and discounted Congresswoman Barbara Comstock and her accomplishments and depth and knowledge of her district and their priorities," said Ken Nunnenkamp, a campaign spokesman. "Barbara has always overperformed, and that won't change in 2018."

Her district spans Washington suburbs, extends into rural counties along the West Virginia border and includes all of bellwether Loudoun County, where roughly half of the Democratic voters in the district reside.

Gov.-elect Ralph Northam won the county by 20 points, far more than McAuliffe's four-point margin of victory in 2013, making it hard for some to see a path to reelection for Comstock if Democrats stay engaged.

[Reverting to quiet bedside manner, Northam says Virginia rejected Washington’s divisiveness]

"The political environment would have to improve a lot for Republicans or the Democratic candidate would have to implode," said David Wasserman, who analyzes House races for the nonpartisan Cook Political Report. "Right now, she's a clear underdog."

Rep. Gerald E. Connolly (D-Va.) surveyed the list of seven Northern Virginia Republicans who lost Tuesday and wondered how Comstock could survive what he termed a realignment election that could deliver Democrats the House of Delegates majority. Four of the contests are too close to call and will undergo a state-funded recount.

"Democrats would make a big mistake underestimating my colleague's staying power and political skills, including her survival skill," he said. But sometimes, he said, the "numbers you just can't deny."

View Graphic Virginia general election guide

Advice for Comstock poured in from Northern Virginia GOP observers, who agreed Tuesday's result is a warning shot to members of Congress from wealthy suburban districts.

Hold town halls, said Tom Davis, a former GOP congressman from Northern Virginia.

Comstock has avoided unscripted public forums with constituents who have spewed venom at her colleagues, such as Rep. Dave Brat (R-Va.)

"Face the music," Davis said. "You've got to let people scream at you a little bit, let them get it off their chest."

Del. Dave Albo (R-Fairfax), who did not seek reelection in part because he couldn't afford to support his family and put in the work needed to win in a competitive year, said Comstock should continue focusing on local issues and attending every ribbon cutting she can find. "I don't think there's anything else she can do," he said. "She's just got to stay the course."

Pete Snyder, Gillespie's campaign chair, said Comstock can combat the "epic tsunami" of this election by "diving in heart first and working harder than anyone else."

Chris LaCivita, a GOP strategist, put it this way: "One thing Barbara won't be is ill-prepared."

Republican supporters give Comstock credit for voting no on the House health-care bill and voting yes on maintaining an Obama-era practice of government funding gender-transition surgery. And she called the "Access Hollywood" tape "disgusting, vile, and disqualifying" for Trump.

That's not enough for Democrats, including those in the nine-way contest to challenge her. Sen. Jennifer Wexton (D-Loudoun), the only elected official running for the nomination, noted Comstock missed two recorded votes to join Trump in the Oval Office when he signed a bill she sponsored.

"I have yet to hear Barbara Comstock stand up against Donald Trump on anything," she said Tuesday night from the Democrats' victory party, where shellshocked volunteers struggled to absorb their unexpected gains. "Taking a particular vote out of political expediency isn't the same as standing up for your constituents."

Alison Friedman, a McLean Democrat who is competing for the chance to challenge Comstock, debuted a new line of attack linking Comstock to Gillespie, who lost by nine points and turned off some voters by failing to criticize some of Trump's most provocative tweets and musings.

"It was a bad night for Gillespie, and it was a bad night for Gillespie's best friend, Barbara Comstock," she said. "That race has proven that you can't equivocate on Donald Trump, and that's what she's done."

Activists galvanized by Trump's win rejoiced online and on Facebook pages.

"Comstock, this district is going blue by big points . . . you are so screwed next year!"

"Where can we see the results? I have never been more interested in an election."

"Fake news this."

Hard-right conservatives didn't overtly attack Comstock, who faces a nomination challenge from little-known candidate Shak Hill.

Asked about Comstock's 2018 fate, Del. Dave LaRock, one of the few Northern Virginia GOP delegates to survive Tuesday, said he was too busy to follow her record but spoke generally about federal lawmakers.

"Promises made, results delivered," he said. "Any member of Congress that deviated from that is probably going to have to answer for that."

Ominous warnings aside, Davis, the former congressman, said a year is a long time in politics. "The landscape will change," he said. "It could be better. It could be worse. I guarantee you it will be different."