The close association between animals and their associated microbiota is usually beneficial for both partners. Here, we used a simple marine model invertebrate, the flatworm Macrostomum lignano, to characterize the host-microbiota interaction in detail. This analysis revealed that the different developmental stages each harbor a specific microbiota. Studies with gnotobiotic animals clarified the physiological significance of the microbiota. While no fitness benefits were mediated by the microbiota when food was freely available, animals with microbiota showed significantly increased fitness with a reduced food supply. The microbiota of M. lignano shows circadian rhythmicity, affecting both the total bacterial load and the behavior of specific taxa. Moreover, the presence of the worm influences the composition of the bacterial consortia in the environment. In summary, the Macrostomum-microbiota system described here can serve as a general model for host-microbe interactions in marine invertebrates.