Genes of the major histocompatibility complex (MHC) have been a source of considerable research interest, owing in large part to the growing body of evidence that they may be subject to both natural and sexual selection. However, much remains to be learned about the dynamics of MHC genes in subdivided populations, particularly those characterized by divergent ecological pressures. In this study, we attempt to disentangle the relative roles of both parasite-mediated selection and MHC-mediated mate choice in an open estuarine system inhabited by two parapatric, adaptively divergent threespine stickleback (Gasterosteus aculeatus) demes. We sequenced the putative peptide-binding region (PBR) of an estimated four Class IIβ loci from 127 individuals, identifying 329 sequence variants (276 translated amino acid sequences). Demes differed significantly both in the frequency of MHC alleles and in the communities of helminth parasites infecting resident sticklebacks. Strong signatures of natural selection were inferred from analyses of codon substitutions, particularly in the derived (freshwater) rather than the ancestral (marine) deme. Relationships between parasite load and MHC diversity were indicative of balancing selection, but only within the freshwater deme. Signals of MHC-mediated mate choice were weak and differed significantly between demes. Moreover, MHC-mediated mate choice was significantly influenced by environmental salinity and appeared of secondary importance to tendencies towards assortative mating. We discuss the implications of these findings in respect to ecological adaptation and the potential demographic consequences of possible outcomes of MHC-mediated mate choice.