Small-intestinal bacterial overgrowth may be one etiologic factor in pigment gallstone disease, previously shown to be prevalent in patients with juxtapapillary duodenal diverticula. In this study the bacterial microflora in the duodenum was examined in 52 patients admitted for endoscopic retrograde cholangiography, 27 with and 25 without duodenal diverticula. Endoscopic sampling was done with a microbiology specimen brush. The reproducibility of the method was good. Presence of gas in the anaerobic cultivation media corresponded closely to growth of Enterobacteriaceae, with a sensitivity of 90% and a specificity of 98%. Gas production in thioglycollate medium with 1% glucose is proposed as a simple criterion of bacterial overgrowth. Patients with diverticula had significantly higher total numbers of bacteria in the duodenum than patients without diverticula (p less than 0.01). Enterobacteriaceae and fecal streptococci dominated the flora in patients with diverticula, and gram-positive cocci were most frequently isolated from patients without diverticula.