Human fetal development takes place in the sterile environment of the uterus. The development of the immune system starts as early as 8 weeks gestation. Directly after birth, in fact already during the birth process, the newborn baby comes into contact with bacteria from the environment, and the gastrointestinal tract becomes colonized with microbiota. This also marks the first contacts of the (mucosal) immune system with microbial antigens. The early exposure to a variety of microbial stimuli regulates the balanced development of the neonatal immune system. On the other hand, the activity of the immune stem also shapes the composition and functionality of the gut microbiota. The cellular and molecular mechanisms underlying these interactions will be discussed in this review, as well as the implications for maintenance of homeostasis and prevention of (immune mediated) diseases.