Dan Helmer, one of six Democrats running for the nomination to challenge Rep. Barbara Comstock in Virginia’s 10th Congressional District, participates in a candidates forum at Battlefield High School on April 10 in Haymarket. (Jahi Chikwendiu/The Washington Post)

The six-way primary for the Democratic nomination to challenge Rep. Barbara Comstock (R-Va.) has taken a sharp turn, with Dan Helmer criticizing state Sen. Jennifer T. Wexton (Loudoun) over her voting record on guns.

During a public forum Tuesday in Haymarket, Helmer highlighted Wexton’s support for a 2016 legislative deal that expanded the rights of concealed-carry handgun permit owners in Virginia and around the country, over the objections of gun-control advocates.

The bill was part of a compromise brokered by former governor Terry McAuliffe (D), GOP lawmakers and the National Rifle Association that also forced domestic abusers to relinquish their firearms and allowed voluntary background checks at gun shows.

“It’s time to elect politicians who will fight for gun safety not only in the bright spotlight of tragedy but also in the dark corridors of power, where it matters,” said Helmer, an Army veteran.

In response, Wexton called the gun legislation historic and said it was easy for people like Helmer, who has never held public office, “to sit in judgment when you’re sitting on the sidelines and not having to actually be down in the trenches.”

Wexton, the only elected official in the Democratic primary, has the highest name recognition and has been endorsed by Gov. Ralph Northam (D) as well as Reps. Gerald E. Connolly (D) and A. Donald McEachin (D).

Gun violence became a central issue in the race to unseat Comstock after 17 people were killed in a Feb. 14 shooting at Marjory Stoneman Douglas High School in Parkland, Fla., an event that sparked a national student-led movement.

In Virginia’s 10th Congressional District, Democratic hopefuls all support gun-control measures such as universal background checks and banning assault weapons and high-capacity magazines.

But on Tuesday, Helmer went after Wexton for not doing more on the issue and said she “multiple times voted to expand concealed-carry access here in this state.”

He was referring to 10 bills Wexton voted for that adjusted the procedure for obtaining a concealed-carry permit and made it easier for judges, retired Department of Corrections investigators and retired probation and parole officers to carry concealed weapons. Most were signed into law by McAuliffe.

She also voted to give concealed-carry rights to certain victims of domestic violence and to allow a gun to be transported in an unlocked car glove box; McAuliffe vetoed both.

Wexton’s campaign pointed to the dozens of times she voted against GOP-led efforts to expand access to guns. She supported multiple gun-control bills killed in the Republican-controlled body, and has an F rating from the NRA.

“Voters in Northern Virginia know that I stand for common-sense gun safety reforms — that’s what I’ve fought for in Richmond and that’s what I’ll fight for in Congress,” she said in a statement Wednesday. “Trying to cherry-pick my record to present anything other than that is grasping and false.”

During the forum, Helmer, who served in Iraq and Afghanistan, said he was devastated by the 2004 death of a friend and fellow soldier in Iraq.

“But I also understood that we had signed up for this,” he said. “But the kids in Parkland and Virginia Tech, right here in Battlefield High School, they didn’t sign up for a war zone in their classrooms.”

In addition to Wexton and Helmer, the field includes Alison Friedman, an anti-human-trafficking activist who worked for the State Department and raised the most money as of Dec. 31; Lindsey Davis Stover, who worked on veterans policy as senior adviser in the Obama administration; former federal prosecutor Paul Pelletier and scientist Julia Biggins.

“One of my priorities, were I to get to Congress, would be to earn an F from the NRA,” Friedman said during the forum.

Comstock has an A rating from the NRA, which is headquartered in Fairfax and has supported her campaigns.

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

Both parties consider it one of the most competitive seats in the country because President Trump is unpopular with the suburban women who represent a significant voting bloc there. Hillary Clinton won the district by 10 percentage points, but Comstock outperformed Trump by 16 points and sailed to reelection.

A blue wave that prompted a record number of retirements among House Republicans, including House Speaker Paul D. Ryan (R-Wis.), complicates Comstock’s path to a third term.

After the forum, Stover called Wexton’s vote on concealed-carry reciprocity “reckless and a use of bad judgment.”

In defending her 2016 vote on the guns deal, Wexton said 60 people were charged with felonies in the first six months after the domestic-violence gun ban took effect.

“I trust the data, and victims of domestic violence are the most vulnerable and those are the people who we need to protect,” she said.

The answer was “somewhat satisfying” for Dave Larsen, a 71-year-old retired scientist, whose favorite candidates are Helmer and Stover.

“I was disappointed that he felt he needed to do that,” he said of Helmer. “I think Jennifer responded very well. . . . We have to recognize that legislators are going to have to know how to compromise.”

But Helmer’s gambit may help him break out of the field.

“If you’re not Senator Wexton, your big challenge is to be heard at all,” said Stephen Farnsworth, a University of Mary Washington political scientist. “So it’s a risk worth taking even if there is some risk of a backlash.”