The birth canal provides mammals with a primary maternal inoculum, which develops into distinctive body site-specific microbial communities post-natally. We characterized the distal gut microbiota from birth to weaning in mice. One-day-old mice had colonic microbiota that resembled maternal vaginal communities, but at days 3 and 9 of age there was a substantial loss of intestinal bacterial diversity and dominance of Lactobacillus. By weaning (21 days), diverse intestinal bacteria had established, including strict anaerobes. Our results are consistent with vertical transmission of maternal microbiota and demonstrate a nonlinear ecological succession involving an early drop in bacterial diversity and shift in dominance from Streptococcus to Lactobacillus, followed by an increase in diversity of anaerobes, after the introduction of solid food. Mammalian newborns are born highly susceptible to colonization, and lactation may control microbiome assembly during early development.