Certain indigestible carbohydrates, known as prebiotics, are claimed to be beneficial for gut health through a selective stimulation of certain gut microbes including bifidobacteria. However, stimulation of such microbes does not necessarily imply a preventive effect against pathogen infection. We recently demonstrated a reduced resistance to Salmonella infection in mice fed diets containing fructo-oligosaccharides (FOS) or xylo-oligosaccharides (XOS). In the present study, faecal and caecal samples from the same mice were analysed in order to study microbial changes potentially explaining the observed effects on the pathogenesis of Salmonella. Denaturing gradient gel electrophoresis revealed that the microbiota in faecal samples from mice fed FOS or XOS were different from faecal samples collected before the feeding trial as well as from faecal profiles generated from control animals. This difference was not seen for caecal profiles. Further analysis of faecal samples by real-time PCR demonstrated a significant increase in the Bacteroidetes phylum, the Bacteroides fragilis group and in Bifidobacterium spp. in mice fed FOS or XOS. The observed bifidogenic effect was more pronounced for XOS than for FOS. The Firmicutes phylum and the Clostridium coccoides group were reduced by both FOS and XOS. Surprisingly, no significant differences were detected between faecal samples collected before and after pathogen challenge in any of the groups. Furthermore, no effect of diets on caecal concentrations of short-chain fatty acids was recorded. In conclusion, diets supplemented with FOS or XOS induced a number of microbial changes in the faecal microbiota of mice. The observed effects of XOS were qualitatively similar to those of FOS, but the most prominent bifidogenic effect was seen for XOS. An increased level of bifidobacteria is thus not in itself preventive against Salmonella infection, since the same XOS or FOS-fed mice were previously reported to be more severely affected by Salmonella than control animals.