Dictyocaulus nematode worms live as parasites in the lower airways of ungulates and can cause significant disease in both wild and farmed hosts. This study represents the first population genetic analysis of large lungworms in wildlife. Specifically, we quantify genetic variation in Dictyocaulus lungworms from wild deer (red deer, fallow deer and roe deer) in Hungary, based on mitochondrial cytochrome c oxidase subunit 1 (cox1) sequence data, using population genetic and phylogenetic analyses. The studied Dictyocaulus taxa display considerable genetic diversity. At least one cryptic species and a new parasite–host relationship are revealed by our molecular study. Population genetic analyses for Dictyocaulus eckerti revealed high gene flow amongst weakly structured spatial populations that utilise the three host deer species considered here. Our results suggest that D. eckerti is a widespread generalist parasite in ungulates, with a diverse genetic backround and high evolutionary potential. In contrast, evidence of cryptic genetic structure at regional geographic scales was observed for Dictyocaulus capreolus, which infects just one host species, suggesting it is a specialist within the studied area. D. capreolus displayed lower genetic diversity overall, with only moderate gene flow compared to the closely related D. eckerti. We suggest that the differing vagility and dispersal behaviour of hosts are important contributing factors to the population structure of lungworms, and possibly other nematode parasites with single-host life cycles. Our findings are of relevance for the management of lungworms in deer farms and wild deer populations.