The impact of cocoa on microbiota composition, its crosstalk with the immune system and the SCFA production, focusing on the involvement of cocoa fibre were investigated Wistar rats were fed for 3-weeks a standard diet, a diet containing 10%-cocoa (C10), cocoa fibre (CF) or inulin (I).Faecal and serum samples were collected before and after the intervention and caecal content and colon sample were collected at the end. Microbiota composition and IgA-coated bacteria and the SCFA content was quantified. The colonic expression of immune-related genes was studied. The CF diet increased Bifidobacterium and Lactobacillus counts, the proportion of IgA-coated bacteria, the SCFA concentrations and the TLR2, TLR5, TLR7 and occludin expression. With the exception on Lactobacillus counts, the I diet modified the other variables in a more modest way than the CF diet. The CF, unlike from the C10 diet, has prebiotic effects and modulates intestinal immune markers.