• Coevolution;
  • enemy-free space;
  • multitrophic networks;
  • speciation;
  • vertical diversification effects

Specialized trophic interactions in plant–herbivore–parasitoid food webs can spur “bottom–up” diversification if speciation in plants leads to host-shift driven divergence in insect herbivores, and if the effect then cascades up to the third trophic level. Conversely, parasitoids that search for victims on certain plant taxa may trigger “top–down” diversification by pushing herbivores into “enemy-free space” on novel hosts. We used phylogenetic regression methods to compare the relative importance of ecology versus phylogeny on associations between Heterarthrinae leafmining sawflies and their parasitoids. We found that: (1) the origin of leafmining led to escape from most parasitoids attacking external-feeding sawflies; (2) the current enemies mainly consist of generalists that are shared with other leafmining taxa, and of more specialized lineages that may have diversified by shifting among heterarthrines; and (3) parasitoid–leafminer associations are influenced more by the phylogeny of the miners’ host plants than by relationships among miner species. Our results suggest that vertical diversifying forces have a significant—but not ubiquitous—role in speciation: many of the parasitoids have remained polyphagous despite niche diversification in the miners, and heterarthrine host shifts also seem to be strongly affected by host availability.