Last week, Del. Barbara J. Comstock voted for a bill that would make it easier for teachers to bring guns onto school grounds. Democrats pounced, accusing the Fairfax County Republican of being “reckless” and out of step with Northern Virginia.

The next day, Del. Robert G. Marshall (Prince William) joined the race for the Republican nomination to succeed retiring Rep. Frank R. Wolf (R) in Virginia’s 10th Congressional District, and he immediately accused Comstock of doing “nothing” to lead on gun rights and other issues important to conservatives.

The crossfire over guns illustrates Comstock’s predicament as she pursues the seat of her former boss. To win the Republican nod in the April 26 firehouse primary, Comstock has to fend off criticism from Marshall and several other conservative contenders even as Democrats try to cast her as too conservative for the electorate that will turn out in November.

“If the primary pushes her too far to the right, then it could be a liability in the general election, but I think it remains to be seen how much time she’s going to have to devote to catering to most conservative elements of her party,” said Nathan Gonzales of the nonpartisan Rothenberg Political Report.

There’s no sign that Comstock, whose campaign declined to comment, has changed or will change any of her positions because of the competitive primary. Yet it is clear that some of the stances that might benefit her most in April might help her least in November — and vice versa.

Virginia State Del. Barbara Comstock addresses the Republican National Convention in Tampa, Fla., on Aug. 28, 2012. (J. Scott Applewhite/AP)

Comstock’s challenge was on display last week at a meeting in Winchester of the Apple Valley Tea Party, which draws members from the western end of the sprawling 10th District. Comstock wasn’t there, but the race was on everyone’s minds.

Brent Anderson, a retired Air Force veteran who considered running for the seat, said that he had studied Comstock’s record in Richmond and that what he saw “makes her a moderate.” He also said that Comstock, who lives in McLean, hails from the most liberal part of the district.

Another attendee, Dana Newcomb, said he knew of five Republican candidates in the 10th District race, and he described them as “four conservatives” and — referring to Comstock — “one that claims to be.”

The field actually has seven GOP candidates: Comstock; Marshall; Stephen Hollingshead, who worked in the administration of President George W. Bush; Howie Lind, a former Pentagon and defense industry official; Marc Savitt, head of the National Association of Independent Housing Professionals; Richard C. Shickle, chairman of the Frederick County Board of Supervisors; and Rob Wasinger, a former congressional aide.

Helped by her personal connections, Comstock has attracted the backing of some key conservative leaders, including the heads of Americans for Prosperity and Citizens United. She also has the endorsement of Pat Mullins, the chairman of the state Republican Party.

Comstock has refrained from tangling with her opponents in the Republican primary, focusing instead on her work in the General Assembly and on collecting endorsements.

Dody Stottlemyer, president of the Apple Valley Tea Party, said that Comstock is clearly “the establishment candidate” but that she is reserving judgment.

“I haven’t met her yet,” Stottlemyer said. “I’ve talked to her by phone. She reached out to me and called me. She seems like a nice lady. I’ve looked at her record, and she’s more conservative than my last delegate was.”

Comstock is scheduled to speak next month to Stottlemyer’s group, many of whose members support the impeachment of President Obama over a host of issues, including the incident in Benghazi, Libya, in which four Americans were killed. Lind told the group last week that, if elected, he would be willing to write articles of impeachment.

“I would. He’s broken so many laws,” Lind said of Obama.

But Comstock, if she is the GOP nominee, will also have to court the 49 percent of 10th District voters who supported Obama in 2012. And Democrats are hoping that the primary will make it harder for her to do so.

“As if Barbara Comstock’s out of the mainstream ideology wasn’t already disconnected from reality, Bob Marshall’s candidacy guarantees a Tea Party primary free-for-all slugfest,” the Democratic Congressional Campaign Committee said in a statement last week.

John W. Foust, a member of the Fairfax County Board of Supervisors, is considered the front-runner for the Democratic nomination, which should be decided at an April 26 convention.

The Rothenberg Political Report rates the 10th District race as “leans Republican,” in part because of the broader political climate, which appears to favor the GOP.

“I feel like the national political environment is probably going to matter more than Barbara Comstock having a primary from the right,” Gonzales said.