Background & Aims: Establishment of the gastrointestinal microbiota during infancy affects immune system development and oral tolerance induction. Perturbations in the microbiome during this period can contribute to development of immune-mediated diseases. We monitored microbiota maturation and associations with subsequent development of allergies in infants and children. Methods: We collected 1453 stool samples, at 5, 13, 21, and 31 weeks postpartum (infants), and once at school age (6–11 years), from 440 children (49.3% girls, 24.8% born by cesarean delivery; all children except for 6 were breastfed for varying durations; median 40 weeks; interquartile range, 30–53 weeks). Microbiota were analyzed by amplicon sequencing. Children were followed through 3 years of age for development of atopic dermatitis; data on allergic sensitization and asthma were collected when children were school age. Results: Diversity of fecal microbiota, assessed by Shannon index, did not differ significantly among children from 5 through 13 weeks after birth, but thereafter gradually increased to 21 and 31 weeks. Most bacteria within the Bacteroidetes and Proteobacteria phyla were already present at 5 weeks after birth, whereas many bacteria of the Firmicutes phylum were acquired at later times in infancy. At school age, many new Actinobacteria, Firmicutes, and Bacteroidetes bacterial taxa emerged. The largest increase in microbial diversity occurred after 31 weeks. Vaginal, compared with cesarean delivery, was most strongly associated with an enrichment of Bacteroides species at 5 weeks through 31 weeks. From 13 weeks onward, diet became the most important determinant of microbiota composition; cessation of breastfeeding, rather than solid food introduction, was associated with changes. For example, Bifidobacteria, staphylococci, and streptococci significantly decreased on cessation of breastfeeding, whereas bacteria within the Lachnospiraceae family (Pseudobutyrivibrio, Lachnobacterium, Roseburia, and Blautia) increased. When we adjusted for confounding factors, we found fecal microbiota composition to be associated with development of atopic dermatitis, allergic sensitization, and asthma. Members of the Lachnospiraceae family, as well as the genera Faecalibacterium and Dialister, were associated with a reduced risk of atopy. Conclusions: In a longitudinal study of fecal microbiota of children from 5 weeks through 6 to 11 years, we tracked changes in diversity and composition associated with the development of allergies and asthma.