Major histocompatibility complex (MHC) genes encode proteins that play a central role in vertebrates' adaptive immunity to parasites. MHC loci are among the most polymorphic in vertebrates' genomes, inspiring many studies to identify evolutionary processes driving MHC polymorphism within populations and divergence between populations. Leading hypotheses include balancing selection favouring rare alleles within populations, and spatially divergent selection. These hypotheses do not always produce diagnosably distinct predictions, causing many studies of MHC to yield inconsistent or ambiguous results. We suggest a novel strategy to distinguish balancing vs. divergent selection on MHC, taking advantage of natural admixture between parapatric populations. With divergent selection, individuals with immigrant alleles will be more infected and less fit because they are susceptible to novel parasites in their new habitat. With balancing selection, individuals with locally rare immigrant alleles will be more fit (less infected). We tested these contrasting predictions using three‐spine stickleback from three replicate pairs of parapatric lake and stream habitats. We found numerous positive and negative associations between particular MHC IIβ alleles and particular parasite taxa. A few alleleparasite comparisons supported balancing selection, and others supported divergent selection between habitats. But, there was no overall tendency for fish with immigrant MHC alleles to be more or less heavily infected. Instead, locally rare MHC alleles (not necessarily immigrants) were associated with heavier infections. Our results illustrate the complex relationship between MHC IIβ allelic variation and spatially varying multispecies parasite communities: different hypotheses may be concurrently true for different alleleparasite combinations.