BackgroundMammary gland (MG) infections (mastitis) are frequent diseases of dairy cows that affect milk quality, animal welfare and farming profitability. These infections are commonly associated with the bacteriaEscherichia coliandStaphylococcus aureus. Different in vitro models have been used to investigate the early response of the MG to bacteria, but the role of the teat in mastitis pathogenesis has received less attention. In this study, we used punch-excised teat tissue as an ex vivo model to study the immune mechanisms that arise early during infection when bacteria have entered the MG.ResultsCytotoxicity and microscopic analyses showed that bovine teat sinus explants have their morphology and viability preserved after 24 h of culture and respond to ex vivo stimulation with TLR-agonists and bacteria. LPS andE. colitrigger stronger inflammatory response in teat when compared to LTA andS. aureus, leading to a higher production of IL-6 and IL-8, as well as to an up-regulation of proinflammatory genes. We also demonstrated that our ex vivo model can be applied to frozen-stored explants.ConclusionsIn compliance with the 3Rs principle (replacement, reduction and refinement) in animal experimentation, ex vivo explant analyses proved to be a simple and affordable approach to study MG immune response to infection. This model, which better reproduces organ complexity than epithelial cell cultures or tissue slices, lends itself particularly well to studying the early phases of the MG immune response to infection.Supplementary InformationThe online version contains supplementary material available at 10.1186/s40104-023-00899-0.