The Xpert GBS real-time PCR assay was applied to gastric fluid samples from 143 newborns, and it detected group B streptococcus (GBS) within 1 h for 16 (11.2%) cases, while microscopic examination detected only 2 cases. The sensitivity and specificity of the Xpert GBS were 80% and 100%, respectively, with regard to 20 cases of GBS colonization or infection. Concordance of Xpert GBS results versus culture was 92.3%. This test detects in a timely manner newborns at risk for invasive GBS disease.