Using restriction fragment length polymorphism (RFLP) we identified 26 unique major histocompatibility complex (MHC) genotypes in 104 water pythons. We observed a significant independent association between reduced blood parasite load (Hepatozoon sp.) and python body length/age, presence of a specific RFLP fragment (C-fragment) and the overall number of fragments. The parasite has a negative impact on several python life-history traits such as growth, nutritional status and longevity. Thus, the C-fragment could be considered a 'good gene' (a fitness-enhancing genetic element). However, while the number of fragments affected parasite load, the association between level of parasitaemia and fragment number was not linear, and, hence, minimum parasite infection level was achieved at an intermediate number of fragments. Intermediate MHC fragment numbers were also observed among the largest/oldest pythons, suggesting that both a specific fragment and intermediate levels of MHC polymorphism enhanced python longevity. Thus, our results suggest python MHC is subject to both frequency-dependent and balancing selection.