Escherichia coli can be serotyped by determination of somatic (O), capsular (K), and flagellar (H) antigens, and clear associations exist between specific O antigens and pathogenic behavior. However, E. coli is very challenging to O type with traditional serologic methods, making new methods for E. coli somatic antigen detection highly desirable. Here, we describe a simple alternative molecular method for determination of the E. coli O type based on allele-specific polymerase chain reaction amplification of the 5' portion of the rfb locus. We present our application of this new method to the detection of the 12 principal O types (O1, O2, O4, O6, O7, O12, O15, O16, O18, O25, O75, and O157) found among bloodstream isolates of E. coli. This method allowed us to determine the O types of 153 strains previously typed using reference methods with an accuracy exceeding 90%. Moreover, some rough or nonagglutinating strains can be successfully typed.