Abstract Study question Is there an association between the endometrial microbiome and the local immune cell composition during the mid-secretory phase? Summary answer The percentage of endometrial neutrophils was negatively related to the highest number of microorganisms, while B-cells and T-helpers were positively related to certain bacterial taxa. What is known already Endometrial receptivity is strongly influenced by the local immune cell composition and its inflammatory status. Meanwhile, many studies on the endometrial microbiome and its impact on receptivity are arising. Knowing that bacterial composition has an effect on the immune system, it is worth studying the potential associations between the microbiome and immune cell populations in the endometrium during the mid-secretory phase. This relationship could adjust the magnitude of inflammation which has a strong effect on embryo implantation process. Investigations on the endometrial bacterial communities’ effect on the local immune cell composition could be applied in improving assisted reproductive technologies. Study design, size, duration Prospective observational study performed between April 2021 and January 2023 in a private in vitro hospital. Endometrial biopsies were collected from 30 women aged between 34 and 45 years during the mid-secretory phase, on day 7 after LH surge. Patients with history of recent inflammatory disease, chronic endometritis, recent antibiotic treatment, endocrinological disorders, autoimmune diseases, oncological diseases, moderate or severe endometriosis, adenomyosis, uterine hyperplasia, and endometrial polyps were not included. Participants/materials, setting, methods B cells, T cells, T helpers, NK cells, macrophages and neutrophils in the endometrial stroma were identified by immunohistochemical staining with antibodies against CD79α (IS62, Dako), CD3 (BRB063, Zytomed), CD4 (IS649, Dako), CD56 (А00121-0007, ScyTek), CD14 (Е-AB-71017, Elabscience) and neutrophil elastase (950334, NOVUSBIO), respectively. The immune cell percentages were calculated by HALO image analysis software (version 2.3, IndicaLabs). Endometrial microbiota (EM) composition was analyzed after DNA isolation using 16S rRNA (v4-v5 region) gene sequencing. Main results and the role of chance Totally 271 bacterial species and 668 genera were identified in the endometrial samples. The median (range) immune cell percentages found were: 0.083% (0.49) B-cells, 0.974% (4.93) T-cells, 0.066% (0.44) T-helpers, 0.931% (5.36) NK-cells, 1.129% (3.11) macrophages and 0.207% (3.86) neutrophils. Spearman analysis revealed significant correlations between T-helpers percentage and the relative abundance of Cutibacterium acnes (R = 0.475, p = 0.012) and its genus Cutibacterium (R = 0.477, p = 0.012) as well as between B-cells and the relative abundance of Bacteroides vulgatus (R = 0.532, p = 0.003) and its genus Bacteroides (R = 0.457,p = 0.013). NK-cells presence was not related to any of the found bacterial species or genus (p > 0.05). Neutrophils demonstrated significant correlations with the relative abundance of the highest number of species: Prevotella melaninogenica (R = −0.404, p = 0.03), Butyrivibrio crossotus (R = 0.433,p = 0.02), Moraxella osloensis (R = −0.433, p = 0.019), Blautia sp. (R = 0.427, p = 0.021), Alicyclobacillus acidocaldarius (R = −401,p = 0.031) also related with the T-cells percentage (R = −0.380, p = 0.042) and Acinetobacter lwoffii (R = −0.458, p = 0.008) also related with the macrophages (R = −0.454, p = 0.013). Among the studied species Alloprevotella tannerae was showing significant correlations with neutrophils (R = −0.0602, p = 0.001), macrophages (R = −0.416, p = 0.025) and T-cells (R = −0.464, p = 0.011). At genus level, most of the bacteria were related to the neutrophils – Pseudoalteromonas (R = −0.540, p = 0.002), Aliterella (R = −0.617, p<0.001), Endhydrobacter (R = −0.433,p = 0.019) and AKIW781 (R = −0.493, p = 0.011). Aliterella and AKIW781 were also related to the macrophages (R = −0.473, p = 0.01 and R = −0.423, p = 0.031, respectively) and T-cells (R = −0.387, p = 0.038 and R = −0.519, p = 0.007, respectively). Limitations, reasons for caution The study was limited in sample size. Wider implications of the findings The results of this study indicated that there is a quantitative relation between the main endometrial immune cells and the endometrial core microbiome. The association between these two determinants of endometrial receptivity could help in understanding the fine tuning of the endometrium for accepting the embryo. Trial registration number The current research was funded by National Science Fund, Ministry of Education, Bulgaria, Contract № KP-06-N53/14/16.11.2021.