• Altitudinal variation;
  • geographic variation;
  • immune defence;
  • implant encapsulation rate;
  • Lycaena tityrus;
  • melanin pathway;
  • pupal melanisation;
  • thermal melanism;
  • trade-off

1. Despite growing knowledge on the relationship between ecological variables and individual immune function, data on the spatial variability of immune defence in invertebrate natural populations are scarce.

2. Here, we use replicated populations of the butterfly Lycaena tityrus from different altitudes to investigate genetic variation in the melanin-based encapsulation response. As high- and low-altitude populations differ in cuticular pupal melanisation, we further tested for any associations between pupal melanisation and parasite resistance.

3. Although pupal melanisation was higher at higher compared with lower altitudes (and at a higher compared with a lower rearing temperature), any obvious relations to the encapsulation response were absent. Further phenotypic correlations within groups were significant in one out of four cases only, suggesting that in L. tityrus encapsulation operates largely independent of cuticular melanisation.

4. A significant interaction between altitude and temperature indicated that high-altitude animals show a stronger melanisation response than low-altitude ones at the lower temperature and vice versa, indicating local adaptation to different climates.