The bacterial community (microbiota) that inhabits the gut of humans appears to be an important source of antigens that drive the chronic immunological processes characteristic of Crohn's disease (CD) and ulcerative colitis (UC). Most of the members of the microbiota have not yet been cultured, but nucleic-acid-based methods of detection and enumeration can provide information about the community. This investigation used these methods to obtain information about the bacteria associated with mucosal surfaces in the gut of 20 CD and 15 UC patients. Biopsies were collected from inflamed and non-inflamed sites in the intestines of newly diagnosed, untreated patients. Biopsies were also collected from several intestinal sites of 14 healthy subjects. The bacterial collections associated with the biopsies were analysed by generating PCR/denaturing gradient gel electrophoresis (DGGE) profiles, the preparation of 16S rRNA gene clone libraries, and qualitative PCR to detect specific groups of bacteria. The total numbers of bacteria associated with the biopsies were determined by real-time quantitative PCR. DGGE profiles generated from the terminal ileum and various colonic regions were characteristic of each individual but differed between subjects. DGGE profiles and 16S rRNA gene libraries showed that the bacteria associated with inflamed and non-inflamed tissues did not differ. UC patients had more bacteria associated with biopsies than did CD patients (P<0.01). Statistical analysis of the composition of 16S rRNA gene libraries showed that the bacterial collections in UC and CD patients differed (P<0.05). Unclassified members of the phylum Bacteroidetes were more prevalent in CD than in UC patients. Therefore, the types and numbers of bacteria associated with biopsy samples were distinctly different for UC and CD patients. The observations made in this study should permit targeting of specific bacteriological abnormalities in investigations of the pathogenesis of inflammatory bowel diseases and provide targets for medical interventions.