Most associations between animals and their gut microbiota are dynamic, involving sustained transfer of food-associated microbial cells into the gut and shedding of microorganisms into the external environment with feces, but the interacting effects of host and microbial factors on the composition of the internal and external microbial communities are poorly understood. This study on laboratory cultures of the fruit fly Drosophila melanogaster reared in continuous contact with their food revealed timedependent changes of the microbial communities in the food that were strongly influenced by the presence and abundance of Drosophila. When germfree Drosophila eggs were aseptically added to nonsterile food, the microbiota in the food and flies converged to a composition dramatically different from that in fly-free food, showing that Drosophila has microbiota-independent effects on the food microbiota. The microbiota in both the flies that developed from unmanipulated eggs (bearing microorganisms) and the associated food was dominated by the bacteria most abundant on the eggs, demonstrating effective vertical transmission via surface contamination of eggs. Food coinoculated with a four-species defined bacterial community of Acetobacter and Lactobacillus species revealed the progressive elimination of Lactobacillus from the food bearing few or no Drosophila, indicating the presence of antagonistic interactions between Acetobacter and Lactobacillus. Drosophila at high densities ameliorated the Acetobacter/Lactobacillus antagonism, enabling Lactobacillus to persist. This study with Drosophila demonstrates how animals can have major, coordinated effects on the composition of microbial communities in the gut and immediate environment. F rom a microbiological perspective, an animal is a transient, nutrient-rich patch. The capacity of various microorganisms to exploit the animal habitat involves multiple traits, including mechanisms that evade or modulate the animal immune system (1-3) and metabolic adaptations to utilize host resources (4, 5). Animal-associated microorganisms include pathogens, whose fitness is coupled to host disease and debility, and beneficial forms that variously contribute nutrients, confer protection, and deliver effectors that promote host performance (6). Consequently, the composition of animal-associated microorganisms is an important determinant of animal fitness.Many animal-microbe associations are open systems, meaning that external microorganisms have access to the host habitat and members of the host microbiota are released back to the external environment via feces, sloughed skin, fluid secretions, etc. (7). Open symbioses can be invaded by external microorganisms that are compatible with the host and are competitive with resident microbiota. As a result, the host is potentially more exposed to parasites and cheats than in a closed system but also has an enhanced capacity to modify the composition of its microbiota adaptively to changes in environmental circumstances (8, 9). The shedding of ...