Alterations in the intestinal microbiota have been suggested as an etiological factor in the pathogenesis of irritable bowel syndrome (IBS). This study used a molecular fingerprinting technique to compare the composition and biodiversity of the microbiota within fecal and mucosal niches between patients with diarrhea-predominant IBS (D-IBS) and healthy controls. Terminal-restriction fragment (T-RF) length polymorphism (T-RFLP) fingerprinting of the bacterial 16S rRNA gene was used to perform microbial community composition analyses on fecal and mucosal samples from patients with D-IBS (n = 16) and healthy controls (n = 21). Molecular fingerprinting of the microbiota from fecal and colonic mucosal samples revealed differences in the contribution of T-RFs to the microbiota between D-IBS patients and healthy controls. Further analysis revealed a significantly lower (1.2-fold) biodiversity of microbes within fecal samples from D-IBS patients than healthy controls (P = 0.008). No difference in biodiversity in mucosal samples was detected between D-IBS patients and healthy controls. Multivariate analysis of T-RFLP profiles demonstrated distinct microbial communities between luminal and mucosal niches in all samples. Our findings of compositional differences in the luminal- and mucosal-associated microbiota between D-IBS patients and healthy controls and diminished microbial biodiversity in D-IBS fecal samples further support the hypothesis that alterations in the intestinal microbiota may have an etiological role in the pathogenesis of D-IBS and suggest that luminal and mucosal niches need to be investigated.