Simple SummaryA common cause of economic losses in sheep breeding is udder diseases (mastitis). The main cause of disease is pathogenic microbes. Their infection adversely affects the quality and quantity of milk and the effects of lamb rearing. Methods of treating this disease so far haven’t brought satisfactory results. Therefore, in this study, an attempt is made to search for natural resistance to udder diseases. The research is carried out on sheep of the Polish Heath and Polish Lowland breeds. Genetic variability of the major histocompatibility complex (MHC) genes are analyzed. MHC molecules enable the recognition of the pathogen and activate other cells of the immune system (T and B lymphocytes) to organize the defense. The content of somatic cells (SCC) in milk (as an indicator of udder health) and the percentage of lymphocyte subpopulation are also assessed in the examined sheep. Among the many alleles of the MHC genes (OLADRB1, OLADRB2, OMHC1), two of them, 488 bp (DRB1) and 284 bp (DRB2) in length, were more frequently reported in sheep, which milk contained <200 × 103/mL SCC, while in carriers of the 508 bp (DRB1) and 272 bp alleles (DRB2) SCC level in milk was significantly higher (>200 × 103/mL). The obtained results justify the need for further research aimed at searching for genetic markers related to resistance to mastitis in sheep.Udder diseases (mastitis) are a serious cause of economic losses in sheep breeding as they have a negative impact on lamb rearing and the quality of dairy products. Thus far, progress in treatment and prevention of these diseases has been insufficient—giving ground for searching possibilities of using natural immunity to combat mastitis. This study aims to assess the relationship between the microsatellite polymorphism of selected Ovar-MHC genes and the health status of the mammary gland of sheep. The research is carried out on sheep of the Polish Heath and Polish Lowland breeds. In ovine milk, the SCC and the percentage of the lymphocyte subpopulation are assessed. Based on genomic DNA, molecular analysis of the Ovar-MHC gene fragments (OLADRB1, OLADRB2, OMHC1) polymorphism is performed. Significant differences are found in SCC level and the percentage of lymphocytes (CD4, CD8, CD19) in the milk depending on the alleles of the Ovar-MHC genes. Alleles of 488 bp (DRB1) and 284 bp (DRB2) are found more frequently in sheep, which milk contained <200 × 103/mL SCC, while in carriers of the 508 bp (DRB1) and 272 bp (DRB2) alleles, SCC level in milk is significantly higher (>200 × 103/mL). The obtained results justify the need for further research to better understand the genetic basis of mastitis, and to search for effective molecular markers that can be used in breeding practice.