Non-digestible oligosaccharides (NDO) were shown to reduce inflammation in experimental colitis, but it remains unclear whether microbiota changes mediate their colitis-modulating effects. This study assessed intestinal microbiota and intestinal inflammation after feeding chemically defined AIN-76A or rat chow diets, with or without supplementation with 8 g/kg body weight of fructo-oligosaccharides (FOS) or isomalto-oligosaccharides (IMO). The study used HLA-B27 transgenic rats, a validated model of inflammatory bowel disease (IBD), in a factorial design with 6 treatment groups. Intestinal inflammation and intestinal microbiota were analysed after 12 weeks of treatment. FOS and IMO reduced colitis in animals fed rat chow, but exhibited no anti-inflammatory effect when added to AIN-76A diets. Both NDO induced specific but divergent microbiota changes. Bifidobacteria and Enterobacteriaceae were stimulated by FOS, whereas copy numbers of Clostridium cluster IV were decreased. In addition, higher concentrations of total short-chain fatty acids (SCFA) were observed in cecal contents of rats on rat chow compared to the chemically defined diet. AIN-76A increased the relative proportions of propionate, iso-butyrate, valerate and iso-valerate irrespective of the oligosaccharide treatment. The SCFA composition, particularly the relative concentration of iso-butyrate, valerate and iso-valerate, was associated (P≤0.004 and r≥0.4) with increased colitis and IL-1 β concentration of the cecal mucosa. This study demonstrated that the protective effects of fibres on colitis development depend on the diet. Although diets modified specific cecal microbiota, our study indicates that these changes were not associated with colitis reduction. Intestinal inflammation was positively correlated to protein fermentation and negatively correlated with carbohydrate fermentation in the large intestine.