If the Democratic Party retakes the House of Representatives in 2018, it may owe its success to military veterans’ candidacies. That, at least, is the perspective emerging from news reporting in recent weeks.

This month, a story in the New York Times reported on 20 Democratic military veterans hoping to unseat Republicans in next year’s midterm elections, writing that party leaders believe that “candidates with a military pedigree [are] an appealing contrast to entrenched, career politicians.” This week, the San Antonio Express-News suggested much the same thing.

Democrats’ hopes appear based on the conventional wisdom that veterans tend to do better than candidates without military experience. But research suggests that any boost veterans may bring the Democrats will depend on where they run. And it is probably only in the most competitive congressional districts that being a veteran could be the difference between winning and losing.

Here’s what research tells us about candidates who are military veterans

History does appear to suggest that veterans win elections. The last two presidential elections are the first since 1944 in which neither major party put a veteran on the ballot. As late as the 1970s, nearly three-quarters of the 535 members of Congress had spent time in the armed forces. However, that proportion declined gradually, so that today only about a fifth of the chamber has served in the military. Behind that decline were smaller wars, fewer veterans, the end of the draft and increasing numbers of women in politics. While female veterans do run and win congressional races — consider, for instance, Sen. Tammy Duckworth (D-Ill.) and Rep. Tulsi Gabbard (D-Hawaii) — more women largely translates to fewer veterans in Congress.

And yet veterans might indeed have an edge in elections, even if there are fewer of them, according to two recent studies. Monika McDermott and Costas Panagopoulos showed that, while conditioned by party, people use candidates’ service as a cue about defense competence and interventionism that leads to higher support for some voters.

In my own research, I found that voters overwhelmingly perceive congressional candidates with military experience to be more able to handle national security and defense issues.

Both studies indicate that veteran candidates can draw support or esteem from voters of the other party more than non-veteran candidates. One source for these effects is also clear. Americans have very high confidence in the military as an institution; no other institution enjoys higher levels.

But these advantages are small compared with other factors that drive election outcomes and will not matter much if the underlying conditions are insurmountable. Advantages shared by veterans might be relevant in close races, but they are hardly going to get an unknown candidate to win a district tilted toward the other party defended by a long-term incumbent.

Democratic veterans tend to run in Republican-leaning districts

And this is why where veterans run is so important. Take last year’s congressional elections. According to data I collected, about 20 percent of Democrats challenging Republican incumbents in 2016 had served in the military. But there was a problem: They tended to run in Republican-leaning districts.

For example, in districts where the Democratic challenger was not a veteran, President Barack Obama’s average vote share in the 2008 and 2012 presidential contests — a good measure of a district’s partisan leanings — was 42.3 percent. But in districts where the Democratic challenger had served in the military, Obama’s vote share was just 39.4 percent. Democratic veterans were running in districts that were almost three points less favorable to their party. They faced an uphill climb from the start.

On the other hand, the opposite was true for Republicans challenging Democratic incumbents. Where Republican nonveterans were running, Obama’s average vote share was 68.4 percent. Where GOP veterans were running, it was just 63.5 percent. To put it more directly, Republican veterans ran for seats that were five points more hospitable than their non-veteran counterparts.

This pattern could help explain why previous Democratic efforts to win with veterans haven’t been particularly successful. In 2006, not long after “swiftboat” and “chicken hawk” entered our lexicon, Nancy Pelosi and the Democratic Party explicitly recruited military veterans to run. That year, about 50 veterans won their primaries. The media called them the “Fighting Dems.” But they mostly lost that November, with Joe Sestak in Pennsylvania and Tim Walz in Minnesota among the few exceptions.

Ultimately, nominating veterans in long-shot races might help pick up a few more votes, but as one of my mentors used to say, that’s like saying that a tall man has a better chance of hitting his head on the moon than a short man. Because of gerrymandering and incumbents’ visibility, any challenger — veteran or non-veteran — will have a hard time unseating a sitting House member in a district that leans toward the incumbent’s party. So even if there were a slight electoral advantage to nominating veterans, it would only matter in races when a challenger is within striking distance.

And even that’s a big “if.” Research in my forthcoming book suggests that veterans don’t always have an advantage in the general election. There are occasional years and races in which veterans do hold an edge over commensurate nonveterans. But usually veterans do about as well as similarly situated nonveterans in general elections.

That conclusion flies in the face of conventional wisdom. But think of it this way: If there were a clear and systematic advantage for veterans in general elections, political parties and primary voters would nominate candidates with military experience more often than they do. If there were a substantial veteran advantage — let’s say a 5 percent bump — we would probably have 435 veterans in the House.

There are plenty of very good reasons for parties to nominate military veterans to hold political office. Veterans are often seen as leaders who patriotically sacrificed years (or more) for their country with experience in one of our government’s most important departments. A nonpartisan nonprofit in Washington called VeteransCampaign.org is dedicated to helping veterans become civic leaders in their community and beyond.

But if the Democrats want military candidates in 2018 to display competence on security and defense issues as a face for their national efforts to win more seats, they will need to cultivate, fund and support compelling veteran challengers in purple districts. Otherwise, the veterans are likely to fade just as quickly as other challengers.

Jeremy M. Teigen is professor of political science at Ramapo College in New Jersey and author of the forthcoming book, Why Veterans Run: Military Service in American Presidential Elections, 1789-2016, published by Temple University Press.