A total of sixty surgically castrated male pigs (Large White × Landrace) weighing 31·2 (sd 4·3) kg were used in a randomised block experiment to examine the effect of added dietary inulin (0, 20, 40 and 80 g/kg) on the occurrence of swine dysentery (SD) and on fermentation characteristics in the large intestine after experimental challenge with the causative spirochaete Brachyspira hyodysenteriae. The pigs were allowed to adapt to the diets for 2 weeks before each pig was challenged orally four times with a broth culture containing B. hyodysenteriae on consecutive days. Increasing dietary levels of inulin linearly (P = 0·001) reduced the risk of pigs developing SD; however, eight out of fifteen pigs fed the diet with 80 g/kg inulin still developed the disease. The pH values in the caecum (P = 0·072) tended to decrease, and in the upper colon, the pH values did decrease (P = 0·047) linearly with increasing inulin levels in the diets, most probably due to a linear increase in the concentration of total volatile fatty acids in the caecum (P = 0·018), upper colon (P = 0·001) and lower colon (P = 0·013). In addition, there was a linear reduction in the proportion of the branched-chain fatty acids isobutyric acid and isovaleric acid in the caecum (P = 0·015 and 0·026) and upper colon (P = 0·011 and 0·013) with increasing levels of dietary inulin. In conclusion, the present study showed that a diet supplemented with a high level of inulin (80 g/kg) but not lower levels reduced the risk of pigs developing SD, possibly acting through a modification of the microbial fermentation patterns in the large intestine.