She won by portraying the congresswoman as a Trump ally who was out of touch with a well-educated, diverse electorate that has begun to shift the district to the left.

“Change is coming to America, and change is coming to Virginia 10, and that change came tonight!” Wexton told cheering supporters at her victory party. “We demand a better nation, a nation where we treat each ­other with dignity and with respect.”

AD

Voters determined to send a message about Trump ousted Comstock after nearly a decade representing parts of the 10th District, first as a state lawmaker and then for two terms in the U.S. House.

AD

Comstock took the stage at her party to rousing applause.

“Success is never final. Failure is never fatal. It’s the courage to continue that counts,” she said, urging young volunteers not to lose heart.

She said she had told one of her granddaughters they were going to Disney World, no matter the result. “So that’s where we’re going now.”

The scene as midterm votes were cast across the country share Share View Photos View Photos Next Image

After a few minutes hugging supporters, she slipped out a back door.

David Ramadan, a former state lawmaker who is close to Comstock, said Trump destroyed the Republican Party and blamed him for the congresswoman’s loss.

AD

“There’s no other way to put it but that this is the fault of the moron in the White House,” he said.

Earlier in the day, Loudoun County retiree Michele Hoehner captured the mood of energized Democrats: “Vote them out!” She voted for Wexton, Sen. Tim Kaine (D) — and change, she said. “Guns are out of control. I’m tired of the meanness.”

AD

Wexton dubbed the congresswoman “Barbara Trumpstock” and frequently shared a statistic from the website FiveThirty­Eight that showed Comstock voted with Trump 98 percent of the time.

In response, Comstock said 82 percent of the bills tracked by the website passed on a bipartisan basis or with support from at least a few Democrats.

AD

But Trump’s influence on the election was unmistakable.

In preliminary results from a Washington Post-Schar School survey of people who voted in the 10th District, nearly 6 in 10 voters said President Trump was one of the two most important factors in their vote, and they favored Wexton over Comstock by a roughly 4 to 10 margin.

The 10th District includes Loudoun County and parts of Fairfax and Prince William counties, as well as Clarke and Frederick counties and the city of Winchester to the west.

AD

Once reliably red, the district has moved to the middle and to the left in statewide and national races, making it more challenging for Republicans to stay afloat, with the exception of Comstock.

AD

Gerry Last, a 59-year-old systems engineer from McLean, voted for Comstock and GOP Senate nominee Corey Stewart, who was soundly defeated by Kaine. But he really saw it as a vote for Trump.

“The country is finally going in a good direction,” he said. “Trump is bringing back jobs. People are buying stuff again. ­I feel like if I want to change jobs now, there are jobs available, where before I felt like I was kind of stuck in the same position.”

Democrat Hillary Clinton won the district by 10 points in the 2016 presidential race, but Comstock also won, over-performing Trump by 16 points, with a relentless focus on local issues. Comstock had called on Trump to drop out of the race after a tape surfaced with him bragging about groping women.

AD

AD

A year later, Democrats and ­anti-Trump voters dominated Northern Virginia, electing Gov. Ralph Northam and ousting all but one Republican state lawmaker who shared territory with Comstock.

Democrats felt good about their chances from the start. Polls showed Trump was unpopular in the district overall and demographics were shifting in their favor with more well-educated, diverse professionals moving in all the time.

The national focus helped Comstock and Wexton raise nearly $5.4 million, with Wexton slightly ahead.

Outside spending also flooded the district. The groups spent about $5.9 million on behalf of Wexton and about $5.5 million on behalf of Comstock, according to the Center for Responsive Politics.

AD

Although public polls showed Comstock behind, the National Republican Congressional Committee stuck by her, shoveling money into the race when others, such as the Congressional Leadership Fund, took a pass.

AD

On the eve of the election, former president Barack Obama, with a box of doughnuts in hand, made a surprise visit to Fairfax to rally Wexton and Kaine loyalists.

Comstock, a former GOP ­operative who investigated the Clintons in the 1990s, tapped friends to raise money at the highest levels of national politics, from Vice President Pence to House Speaker Paul D. Ryan (R-Wis.).

Not long after Trump was elected, Democrats built their campaign around harnessing 2017 voter enthusiasm and directing it at the congressional race.

AD

In past years, the party had struggled to find at least one viable candidate to challenge Comstock, but this year more than a dozen serious candidates expressed interest.

Wexton won a six-way primary on her legislative record and the strength of endorsements from Northam and Rep. Gerald E. Connolly (D-Va.) and the influential gun-control group, the Coalition to Stop Gun Violence.

AD

Amit Suri, a 47-year-old physician from McLean, voted for Wexton to make a statement about Comstock’s ties to the National Rifle Association, which gave her an A rating.

“It’s appalling to see a country where kindergartners are mowed down and we still can’t talk about it,” Suri said.

AD

In the general election, Wexton emphasized her personal story as a working mom with deep roots in Loudoun County, the heart of the district.

One ad combined video of her driving her two boys to and from school as they grew up with her accomplishments in the state Senate: “helped moms collect child support,” “targeted sex offenders,” “took guns away from domestic abusers.”

Another ad made sure voters knew Wexton voted in the General Assembly to expand Medicaid, a major longtime goal for Democrats.

While Democrats consider Comstock too conservative for the district, some Republicans think she is too moderate and she faced a primary challenge from the right.

AD

She won with 61 percent of the vote and turned to the general election determined to convince voters she should be judged on her own record, not that of Trump and the GOP.

Comstock, whose district includes tens of thousands of federal workers, opposed Trump’s call for a pay freeze and government shutdowns, and she voted against the Trump-backed bill repealing the Affordable Care Act.

Her ads called her an “independent fighter for Virginia” and “Virginia’s independent voice” and made the case that GOP policies stimulated the economy.

She also played up her support for victims of sexual harassment on Capitol Hill with an ad featuring a woman who lost an internship because she wouldn’t meet a congressman at his home alone one night.

Wexton questioned Comstock’s commitment to the ­#MeToo movement by noting her support for her longtime friend and Supreme Court Justice Brett M. Kavanaugh in the face of accusations from Christine Blasey Ford during his confirmation process.

AD

NRCC ads seized on Wexton’s vote for a budget that imposed massive toll hikes, despite her opposition to the tolling plan and accused her of reducing charges against violent criminals.

The ad cited two cases where Wexton dropped charges as part of plea bargains.

None of that mattered for Courtney Riddle, a 46-year-old business owner from Loudoun County who normally votes Libertarian but went with Wexton and Kaine this time.

“At the core of it,” Riddle said, “we need to make a statement against our administration.”