There were many reasons Democrat Jeremy McPike could have — maybe should have — lost his race for the Virginia Senate on Tuesday. He was a political neophyte up against a popular local mayor. The family of the retiring Democrat whose long-held seat McPike sought endorsed that same popular local mayor. The Virginia GOP worked hard to pin to McPike a highly unpopular proposal to add expensive tolls to the key commuter interstate connecting the district to Washington D.C., a plan emanating from the administration of his most notable political ally, Democratic Governor Terry McAuliffe.

Despite all those handicaps, McPike won handily in an off-year election when progressives and their causes struggled around the nation, beating Republican Hal Parrish 54-46. And the most important lesson from his victory is the one that strategists on the left were watching for: McPike’s aggressive support of more restrictive gun laws did not sink his campaign, and may (we don’t know this definitively yet) have given it a boost.

For decades, the conventional wisdom has held that running on gun reform is political poison for Democrats, especially in southern states. But gun reform was a message that McPike did not shy from; as recently as this weekend, he sent a mailer to voters that quoted a Washington Post editorial dubbing Parrish “a darling the National Rifle Association.” Gun reform took further prominence in the race thanks to the support McPike’s candidacy received from two prominent gun violence prevention groups. Gabby Gifford’s gun-reform group, Americans for Responsible Solutions, ran a get-out-the-vote program, while the Michael Bloomberg-funded Everytown for Gun Safety stepped in with a $1.5 million ad buy during the race’s home stretch.

A precinct-by-precinct analysis shows roughly a dozen areas where the 40-year-old McPike netted at least 5 percent more of the vote this year than longtime incumbent Democrat Charles Colgan did when winning re-election in 2011, a year when there was also no governor’s race to buoy turnout. (McAuliffe was elected in 2013.) Much of those upticks were offset, though, by the 64-year-old Parrish’s dominance in the city of Manassas, where he has been mayor since 2008. ARS did not return requests for comment on Wednesday regarding which precincts the group and Virginia Democrats had targeted. The group is using experiments run in some of this year’s state Senate races to gather information on whether gun-reform messages can propel certain less-frequent voters to the polls.

What’s clear from the data is that McPike’s embrace of gun reform in this fast-growing suburban area west of Washington D.C. did not hurt his performance. Polls had him trailing Parrish before breaking away for his eight-point win. But just how much McPike’s gun positions specifically affected his vote haul is a question to be answered in coming weeks as ARS and the Virginia Democratic Party examine voting returns and assess what specific messages were effective.

Before election day, University of Mary Washington political science professor Stephen Farnsworth warned that the gun issue could spark a backlash against McPike and tip the race to Parrish. Moderating that assessment, he now believes that both candidates benefited from all the attention to gun policy. “I look at this largely as a wash because probably some people were more motivated to vote on both sides because of the gun message.”

Arkadi Gerney is a senior vice president for campaigns and strategies at the Center for American Progress, the think tank whose research undergirds some of the new electoral efforts to find winning gun-reform messages. He says he expects skepticism regarding the effectiveness of the focus on guns to persist, even among fellow progressives. “The concern-trolls within the Democratic ranks will come out and they will say there was some backfire. And there probably was,” he says. “But the question is whether the positive impact is greater than the negative impact. We think so.”

[Photo: Jahi Chikwendiu/The Washington Post via Getty Images]