With her mother, Sally Burns, by her side, Del. Barbara Comstock talks to constituents at a Clifton Republican Women's Club meeting in Fairfax Station on April 17. (Melina Mara/The Washington Post)

They came at her hard, trying to goad Virginia state Del. Barbara J. Comstock into slipping up:

“How can we possibly trust her to cut government spending when she’s been first in line at the trough for years?”

“I’m going to go to Washington to represent all the people, not just the businesses who can afford to hire lobbyist Comstock to represent them in Washington.”

“All of us go to tea party meetings, except Barbara.”

CAMPAIGN 2014: This is the second in an occasional series about the race for Northern Virginia’s 10th Congressional District – a diverse, fast-changing place and a key swing seat in the capital’s backyard. Read the first story here. (Photo by Melina Mara/The Washington Post)

Through all the appearances with her primary opponents, Comstock (R-Fairfax) smiled and said little — trying at once to hide her moderation yet not betray it for a fall election she hoped to win in ever-bluer Northern Virginia.

“This is a swing district,” she said at one forum, “and I’ve always worked with everybody.”

When Rep. Frank R. Wolf (R-Va.) announced he would retire after 34 years, a huge first question in his Northern Virginia congressional district was how the GOP would pick its nominee — and whether it could prevent the disaster that unfolded last fall, when Democrats swept all three statewide offices against a slate of conservative candidates cast as out of step with changing Virginia.

GOP leaders quickly set about preventing the nomination of a candidate too volatile or right-leaning to appeal to moderate voters in a newly crucial swing district. Battling with the tea party across the country for control of the GOP, these leaders quickly united behind Comstock.

Polished. Conservative enough. And, as a Capitol Hill lobbyist and former head of public affairs for the Justice Department, a master at the kind of messaging needed to thread the needle just so in Virginia’s sprawling 10th District, where Republicans range from gun enthusiasts in rural farm towns to federal contractors in Fairfax County more worried about traffic.

Comstock won the April 26 firehouse primary, though not without cost. Bruised by the attacks of her five more conservative opponents, she now must reposition for another potentially bruising battle with John Foust, a Fairfax County supervisor and the Democratic nominee.

Her victory creates half a blueprint for a party struggling to reconcile its conservative base with an ever-changing general electorate. But the other half remains to be seen: whether, in the fall, she can attract the moderates who have been flocking to Democrats in recent elections.

The firehouse primary

How Comstock won the primary is a study in political gamesmanship, where every inch of the nomination process was guarded in favor of the establishment’s choice.

“I don’t think I’ve ever seen the party coalesce around a nominee so quickly,” said John Whitbeck, chairman of the 10th Congressional District Republican Committee.

A key moment came in January, when state Sen. Richard H. Black (R-Loudoun) entered the race, carrying with him controversial remarks about spousal rape, homosexuality and sexual assaults in the military that ignited strong support among social conservatives — but equally strong antipathy from Democrats and some independents.

Almost immediately, several party leaders publicly encouraged Black to stay in the evenly split state Senate so the balance of power in Richmond would not tilt further toward Democrats.

Two days after he announced his candidacy, Black withdrew. In a district that stretches from McLean’s soaring mansions to farmland near the West Virginia border, the decks were partially cleared for Comstock.

“Republicans really dodged a bullet when Dick Black chose not to run,” said David Wasserman, an analyst with the nonpartisan Cook Political Report.

Others tried to turn the primary election into a mandate on the leadership of House Speaker John A. Boehner (R-Ohio). But they, too, said they were quietly encouraged to withdraw.

“I had a lot of people come up to me and say: ‘What are you doing? You’re running against Barbara?’ ” said Howard Lind, a former U.S. naval commander.

Congressional candidate Del. Barbara Comstock, right, is seen with fellow candidate Howie Lind during a Republican debate in Sterling on April 9. (Melina Mara/The Washington Post)

“The establishment was throwing a lot of weight behind her and they were, basically, mad at me,” Lind said.

Then came the mechanics of the primary election, with Republican leaders in the 10th District choosing to hold a “firehouse primary,” or canvass, instead of a regular primary or a convention. That allowed Comstock to focus much of the nearly $780,000 her campaign raised on a specific group of likely Republican voters through a barrage of visits, phone calls and ads.

Her opponents’ efforts on those fronts were meager by comparison.

A canvass, which limited voting to a five-hour window on a Saturday at 10 locations across the district, was chosen for several reasons, Whitbeck said.

Because Virginia has open primaries, it guarded against Democrats seeking to subvert the election by supporting a candidate who might be unpalatable to moderate voters in a general election, he said.

It also avoided a raucous convention, where party activists tend to rally behind more conservative candidates — and can more easily affect the outcome through a series of delegate votes that require a nominee to win more than 50 percent of the vote.

“This would most likely have affected both turnout and outcome,” said state Del. Robert G. Marshall (R-Prince William), an outspoken and popular conservative who became Comstock’s greatest threat after Black bowed out.

Marshall, known for once calling disabled children a punishment from God on women who’ve had abortions, drew loud applause during debates when he boasted about being a regular foil to Republican leaders in Richmond. He vowed to bring that same uncompromising style to Congress.

Comstock’s campaign, which declined to answer questions about the nomination process, lobbied against holding a convention, her opponents said.

Building coalitions

Finally, Comstock cast herself as the sensible choice for Republicans by wrapping her congressional bid in Wolf’s legacy and attempting to soften her own conservative record in the legislature, including a vote for a controversial mandate that women seeking abortions first submit to an invasive ultrasound.

Congressional candidate Del. Barbara Comstock attends a Republican debate in Sterling on April 9. (Melina Mara/The Washington Post)

Constituents sing “God Bless America,” from left to right, Betty Harrison, Sheila Falsetti, Robert Cheeven and Del Marsha, before a debate at Patrick Henry College in Purcellville on April 13. (Melina Mara/The Washington Post)

Where her opponents took hard-line stances on the health-care law, Comstock adopted a more centrist line — vilifying the Obama administration for pushing the law through while calling for “good, logic-based patient care reform.”

She cast herself as a coalition builder on such issues as the fight against human trafficking and luring jobs to Virginia. She also blamed tea party conservatives for her party’s woes in Virginia, particularly the national backlash over the federal government shutdown last November.

“If we had been opened and talking about Obamacare those five days before the election, I think Ken Cuccinelli would have been governor,” she said at a business forum in McLean.

As a senior adviser to Mitt Romney during his 2012 presidential bid, Comstock entered the election with a national profile — a regular face on cable TV news shows always ready to serve up a soundbite.

“My 80 percent friend is not my 20 percent enemy,” she said repeatedly during the primary campaign.

The mandate for Comstock to appeal to divergent voter perspectives — even in a Republican primary — is clear in the 10th District’s electorate itself.

Republicans there can sound like Robert Luzzi, 60, who flies a tea party “Don’t Tread on Me” flag outside his Springfield home and calls himself “a belligerent conservative.”

“I’m the kind of guy who’s willing to shut down the government,”said Luzzi, a retired U.S. Air Force pilot.

And, they can sound like Susan Carney, 59, of Winchester, who cut off one candidate visiting her South American crafts store by saying she’s in favor of the health-care act.

“As a small business person, with a sick husband, I have to admit that Obamacare would really help me out,” she told the candidate, Stephen Hollingshead.

Republican candidate Stephen Hollingshead and his wife, Jan Hollingshead, listen to speakers during a Clifton Republican Women's Club meeting on April 17. (Melina Mara/The Washington Post)
A sweeping reaction

Appealing to voters across the spectrum has not been the GOP’s strong suit in recent election cycles.

In last fall’s statewide elections in Virginia, the Republican ticket for governor, lieutenant governor and attorney general emerged from a convention dominated by deep conservatives motivated largely by populist outrage over the Affordable Care Act, illegal immigration and other core tea party grievances.

The candidates — former attorney general Ken Cuccinelli II, minister E.W. Jackson and state Sen. Mark D. Obenshain (R-Harrisonburg) — failed to win over moderates and independents in what became the Democrats’ first sweep of all three statewide offices in 24 years.

To avoid that fate, Comstock walked a gantlet of attacks from her Republican opponents that made her allies nervous. “If they nominate Bob Marshall, we lose the seat,” confided one senior Republican aide before the primary election.

During a candidates’ forum in Purcellville, Rob Wasinger ignited anti-Comstock sentiments inside a packed Patrick Henry College auditorium with a favorite tea party line.

“Barbara, you lie!” said Wasinger, a former chief of staff to two congressman, paraphrasing a charge Rep. Joe Wilson (R-S.C.) hurled at President Obama in 2009 during a speech about the health-care law.

In the face of many of those attacks, Comstock stayed silent — the only woman amid five white men smiling quietly and looking down as her opponents hammered away at her again and again.

It worked. Comstock received slightly more than half of the 13,609 votes cast in the primary. Marshall came in second.

More challenges remain, however.

Supporters of Foust, the Democrat, are seizing on the acrimony of the Republican primary while calling Comstock a weak, “machine” politician.

“This intra-party slugfest is the worst-case scenario for Republicans, and Barbara Comstock is limping toward election day as a badly damaged candidate who has been unable to unify the support of even her own party,” said David Bergstein, spokesman for the Democratic Congressional Campaign Committee.

Indeed, Comstock volunteers lamented having to do too much damage control from attacks from fellow Republicans. And the damage may still grow from the party’s most conservative activists, who are known to stay home on Election Day if they don’t believe in their party’s nominee. Some voters who were against Comstock expressed apathy about the November election.

“She’s a stealth Democrat,” said Lucy Dartley, 77, who supported Marshall in the primary election and admitted it’s unlikely she would make the effort to vote in November.

Searching for a better way to put it, Dartley drew another comparison meant to be negative that Comstock may not mind as she seeks to thread yet another needle in November.

“Barbara Comstock is not anything like Sarah Palin or Michelle Bachman,” Dartley said, with a flick of her hand.

Virginia's bellwether 10th District