The gut microbiota has been implicated in obesity and its progression towards metabolic disease. Dietary interventions that target the gut microbiota have been suggested to improve metabolic health. The aim of the present study was to investigate the effect of interventions with Lactobacillus paracasei F19 or flaxseed mucilage on the gut microbiota and metabolic risk markers in obesity. A total of fifty-eight obese postmenopausal women were randomised to a single-blinded, parallel-group intervention of 6-week duration, with a daily intake of either L. paracasei F19 (9·4 × 1010 colony-forming units), flaxseed mucilage (10 g) or placebo. Quantitative metagenomic analysis of faecal DNA was performed to identify the changes in the gut microbiota. Diet-induced changes in metabolic markers were explored using adjusted linear regression models. The intake of flaxseed mucilage over 6 weeks led to a reduction in serum C-peptide and insulin release during an oral glucose tolerance test (P< 0·05) and improved insulin sensitivity measured by Matsuda index (P< 0·05). Comparison of gut microbiota composition at baseline and after 6 weeks of intervention with flaxseed mucilage showed alterations in abundance of thirty-three metagenomic species (P< 0·01), including decreased relative abundance of eight Faecalibacterium species. These changes in the microbiota could not explain the effect of flaxseed mucilage on insulin sensitivity. The intake of L. paracasei F19 did not modulate metabolic markers compared with placebo. In conclusion, flaxseed mucilage improves insulin sensitivity and alters the gut microbiota; however, the improvement in insulin sensitivity was not mediated by the observed changes in relative abundance of bacterial species.