Streptococcus mutans is a major cariogenic bacterium. It has adapted to the biofilm lifestyle, which is essential for pathogenesis of dental caries. We aimed to identify small molecules that can inhibit cariogenic S. mutans and to discover lead structures that could give rise to therapeutics for dental caries. In this study, we screened a focused small-molecule library of 506 compounds. Eight small molecules which inhibited S. mutans at a concentration of 4 μM or less but did not affect cell growth or biofilm formation of commensal bacteria, represented by Streptococcus sanguinis and Streptococcus gordonii, in monospecies biofilms were identified. The active compounds share similar structural properties, which are characterized by a 2-aminoimidazole (2-AI) or 2-aminobenzimidazole (2-ABI) subunit. In multispecies biofilm models, the most active compound also inhibited cell survival and biofilm formation of S. mutans but did not affect commensal streptococci. This inhibitor downregulated the expression of six biofilm-associated genes, ftf, pac, relA, comDE, gbpB, and gtfB, in planktonic S. mutans cells, while it downregulated the expression of only ftf, pac, and relA in the biofilm cells of S. mutans. The most potent compound also inhibited production of two key adhesins of S. mutans, antigen I/II and glucosyltransferase (GTF). However, the compound did not alter the expression of the corresponding genes in both S. sanguinis and S. gordonii, indicating that it possesses a selective inhibitory activity against S. mutans. Copyright © 2011, American Society for Microbiology. All Rights Reserved.