The major histocompatibility complex (MHC) is a multigene cluster characterized by remarkable polymorphism and a complex evolutionary history. The MHC genes assume a central role in the adaptive immune response of vertebrates and their polymorphism is thought to affect the functional plasticity of immune responses against heterogeneous pathogenic pressures. Beside of their immune function, MHC genes are thought to be involved in a variety of non-immune functions, such as mate choice, individual or kin recognition and other reproductive functions. This makes them a particularly interesting molecular marker to address some fundamental evolutionary questions, such as evolution of molecular adaptations or proximate mechanisms maintaining species diversification at the molecular level.The challenges imposed by genotyping highly polymorphic MHC genes have long hampered progress in conducting large-scale studies that would enable addressing such questions, especially in non-model organisms. Introducing Next-generation sequencing (NGS) therefore represent a major break-through in this aspect. I first review advantages as well as challenges linked to the use of NGS for MHC genotyping before envisioning the revolutionary implications of integration of NGS into MHC-based research in evolutionary ecology and primatology.Moreover, the remarkable MHC polymorphism often crosses species boundaries, with similar alleles or allelic motifs shared across species. Understanding the origin and mechanisms underlying the maintenance of this polymorphism across different species may improve our understanding of the evolution of host-immune response. Here, I therefore aimed to broaden our understanding of the evolution and the maintenance of MHC class II polymorphism at the community level. First, I explored MHC variation at the two highly polymorphic loci, DRB and DQB, and patterns of molecular selection acting upon them in four sympatric con-familiar lemur species -Microcebus murinus, M. berthae, Cheirogaleus medius and Mirza coquereli (Cheirogaleidae).I observed contrasting patterns of MHC variation and molecular selection, but also considerable functional and structural overlap among MHC alleles of these species.These lemurs present contrasting aspects of their ecology that has been suggested to affect SUMMARY 2 MHC variation and the level of pathogen exposure. I found out that demographic factors may exert a stronger influence than pathogen-driven selection on current levels of standing allelic richness, especially in species with more pronounced ecological vulnerability.I then attempted to elucidate the origin of MHC allelic similarity. Shared MHC polymorphism at coding regions has been suggested to reflect either the operation of convergent selection in the presence of parallel selective pressures (e.g. shared parasites), or via allelic co-ancestry and the long-term maintenance of MHC sequence motifs over multiple speciation events. I integrated MHC data with parasitological screening of gut helminth communities to investigate whet...