To evaluate whether different deoxyribonucleic acid (DNA) extraction procedures can affect estimates of bacterial community composition, based on the 16S ribosomal ribonucleic acid gene denaturing gradient gel electrophoresis (DGGE) profiles, we compared four in situ lysis procedures using three soils and one marine sediment. Analysis of DGGE profiles, generated by polymerase chain reaction of purified DNA extracts, demonstrated that the choice of DNA extraction method significantly influenced the bacterial community profiles generated. This was reflected both in the number of bands or ribotypes detected from each sample and in subsequent principle coordinate analysis and unweighted-pair group method using arithmetic average analyses. The methods also differed significantly in their robustness, i.e. reproducibility across multiple analyses. Two methods, both based on bead beating, were demonstrated to be suitable for comparative studies of a range of soil and sediment types.