Two pairs of sympatric three-spined stickleback Gasterosteus aculeatus morphs and two single morph populations inhabiting mud and lava or rocky benthic habitats in four Icelandic lakes were screened for parasites and genotyped for MHC class IIB diversity. Parasitic infection differed consistently between G. aculeatus from different benthic habitats. Gasterosteus aculeatus from the lava or rocky habitats were more heavily infected in all lakes. A parallel pattern was also found in individual MHC allelic variation with lava G. aculeatus morphs exhibiting lower levels of variation than the mud morphs. Evidence for selective divergence in MHC allele number is ambiguous but supported by two findings in addition to the parallel pattern observed. MHC allele diversity was not consistent with diversity reported at neutral markers (microsatellites) and in Þingvallavatn the most common number of alleles in each morph was associated with lower infection levels. In the Þingvallavatn lava morph, lower infection levels by the two most common parasites, Schistocephalus solidus and Diplostomum baeri, were associated with different MHC allele numbers.