Lactobacillus and Prevotella, whose relative abundances are strongly associated with bacterial vaginosis, were the most heritable bacteria among the beneficial and potentially pathogenic vaginal microbiota, respectively.