A fluorescently labeled oligonucleotide probe (molecular beacon) was applied to detect Escherichia coli O157:H7 in artificially contaminated skim milk during polymerase chain reaction (PCR) amplification of extracted DNA. The probe was designed to hybridize with a region of the slt-II gene coding for the A subunit and to fluoresce when the hairpin-stem conformation was linearized upon hybridization to the target sequence. The molecular beacon was incorporated into PCR reactions containing DNA extracted from artificially contaminated skim milk. The degree of fluorescence was monitored in PCR reactions containing 10(3), 10(5), and 10(7) CFU of E. coli O157:H7 per ml and was found to correlate with the amount of template in each reaction. Fluorescence significantly increased above background levels by cycle 8, 14, or 14 in reactions containing DNA from the 10(7)-, 10(5)-, or 10(3)-CFU/ml template, respectively (P < 0.05). Molecular beacon PCR demonstrated positive results more rapidly than traditional agarose gel electrophoresis analysis of PCR products. Use of molecular beacons allows real-time monitoring of PCR reactions, and the closed-tube format allows simultaneous detection and confirmation of target amplicons without the need for agarose gel electrophoresis and/or Southern blotting. This is the first report of a stem-and-loop molecular beacon being applied for direct detection of a pathogen in food.