Correction: An earlier version of this article misrepresented the vote results in Loudoun County. The correct totals were 2,203 for Del. Barbara J. Comstock, 976 for Del. Robert G. Marshall and 282 for Stephen Hollingshead. This version has been corrected.

Barbara Comstock talks with voters at Langley High School in McLean on Saturday. She won the Republican nomination Saturday for a congressional seat long held by outgoing U.S. Rep. Frank R. Wolf (R), according to official results. (Bill O’Leary/The Washington Post)

Virginia Del. Barbara J. Comstock handily won the Republican nomination Saturday for a congressional seat long held by outgoing U.S. Rep. Frank R. Wolf (R), according to official results.

The victory sends Comstock into what is expected to be a tight general election contest with Democratic nominee John W. Foust, a Fairfax County supervisor representing part of McLean and Great Falls.

In contrast to a number of recent Republican losses in Virginia featuring conservative GOP nominees, Comstock’s support from the party establishment and her effort to cast herself as a pragmatist may put the GOP in position to keep the seat held by Wolf for 34 years.

“The election in November will be about my plans to get the economy growing again, creating jobs, and repealing and replacing Obamacare,” Comstock said in a statement. “Congress is in desperate need of problem solvers and I intend to use my common sense principles to better the lives of my constituents when I am elected in November.”

With Wolf’s pending retirement, both major parties consider the 10th District crucial in gaining political leverage on Capitol Hill, among a handful of House of Representatives seats nationwide considered to be in play.

In a mostly smooth firehouse primary, or canvass, election that attracted 13,609 voters in Virginia’s sprawling 10th Congressional District, Comstock (Fairfax) took nearly 54 percent of the votes cast in 10 different polling locations.

State Del. Robert G. Marshall (R-Prince William) took 28 percent. Howard Lind got 8 percent of the votes, and the other three candidates — Stephen Hollingshead, Rob Wasinger and Mark Savitt — split the remainder.

Encompassing portions of Fairfax and Loudoun counties and stretching to the West Virginia state line, the 10th is considered a swing district by both parties.

President Obama narrowly won there in 2008, Mitt Romney took it by slightly more than 1 percent in 2012, and in last fall’s gubernatorial election, Republican Ken Cuccinelli barely out-polled Democrat Terry McAuliffe.

For the midterm congressional election, Democrats have poured resources behind Foust, who has raised about $776,000 since January.

Comstock, a former aide to Wolf who served as senior advisor to Romney’s 2012 presidential bid, entered the race for the Republican nomination as a clear favorite.

She secured backing early on from House Majority Leader Eric Cantor (Va.) and other high-profile Republican leaders, support that allowed her campaign to bring in $780,000 since January.

On Saturday, the money poured into getting out the vote among a relatively small subset of highly motivated Republican voters paid off.

People streaming into one of the polling stations at Langley High School in Fairfax were greeted by a Comstock campaign stand that resembled a county fair booth in its festiveness, offering free coffee and bagels to anyone interested.

Across the school entrance walkway, campaign signs from the other five candidates looked lonely by comparison.

Several voters who supported Comstock cited the polished candidate’s “electability” in November, giving Republicans a better chance at keeping Wolf’s seat.

“You have to be a realist and look at the race and who has the name recognition and can go against the Democrat,” said Carol Presler, 59, outside a polling station at Centreville High School, adding that she nonetheless liked all six candidates.

In Loudoun, Bruce Bowen said he chose Comstock because he’s worried the Republican party is imploding amid a nationwide battle for control between tea party conservatives and so-called “establishment Republicans” such as Comstock.

“We need less radical people in Congress,” Bowen, 63, said. “Congress, as far as I’m concerned, is largely dysfunctional. Too much special interests. Too many people not thinking about the country’s interest and too many people unwilling to compromise.”

Bridget Gidley, 52, said she chose Comstock because she’ll be competitive in November, and also because of her personal touch as a state delegate representing McLean, Great Falls and portions of Loudoun.

During a snowstorm a few years ago, Comstock went out to knock on the doors of seniors to make sure they were safe, Gidley said.

“You get jaded by some politicians,” she said. “She’s tireless, and she’s responsive.”

Other voters eagerly supported the other candidates with the same degree of passion — reflecting the often emotional tenor of a nomination race that served as a microcosm of the larger struggle for party control.

“We need someone to speak up and fight for what they believe in,” said Mike Fiscetti, who voted for Marshall and characterized Comstock as too eager to please party leaders.

“The go-along-to-get-along attitude is just not my cup of tea,” he said.

In her statement, Comstock called on her fellow Republicans to rally around her effort to defeat Foust, whom she dubbed “Nancy Pelosi’s hand-picked candidate.”

But the attacks against her in the primary election have been fodder for Foust and his supporters.

On Saturday, the Democratic Congressional Committee responded to Comstock’s victory with a press release that highlighted her vote for Obama in 2008 — a decision that Comstock has said was meant to undermine Hillary Clinton’s chances that year and that her opponents called proof of her untrustworthiness.

Democrats said the vote exhibits Comstock’s willingness to win at any cost, even if it means going against her principles.

“Comstock’s primary battle left deep scars on her carefully developed facade,” the Democratic organization said, setting the tone for the November election campaign.

Foust congratulated Comstock in a statement before laying blame on her for stalled budget talks in Richmond.

“Comstock’s brand of partisan brinkmanship is exactly what’s wrong in Washington,” he said.