A quantitative molecular technique was developed for rapid analysis of microbial community diversity in various environments. The technique employed PCR in which one of the two primers used was fluorescently labeled at the 5' end and was used to amplify a selected region of bacterial genes encoding 16S rRNA from total community DNA. The PCR product was digested with restriction enzymes, and the fluorescently labeled terminal restriction fragment was precisely measured by using an automated DNA sequencer. Computer-simulated analysis of terminal restriction fragment length polymorphisms (T-RFLP) for 1,002 eubacterial sequences showed that with proper selection of PCR primers and restriction enzymes, 686 sequences could be PCR amplified and classified into 233 unique terminal restriction fragment lengths or "ribotypes." Using T-RFLP, we were able to distinguish all bacterial strains in a model bacterial community, and the pattern was consistent with the predicted outcome. Analysis of complex bacterial communities with T-RFLP revealed high species diversity in activated sludge, bioreactor sludge, aquifer sand, and termite guts; as many as 72 unique ribotypes were found in these communities, with 36 ribotypes observed in the termite guts. The community T-RFLP patterns were numerically analyzed and hierarchically clustered. The pattern derived from termite guts was found to be distinctly different from the patterns derived from the other three communities. Overall, our results demonstrated that T-RFLP is a powerful tool for assessing the diversity of complex bacterial communities and for rapidly comparing the community structure and diversity of different ecosystems.