Microbial communities often undergo intricate compositional changes yet also maintain stable coexistence of diverse species. The mechanisms underlying long-term coexistence remain unclear as system-wide studies have been largely limited to engineered communities, ex situ adapted cultures or synthetic assemblies. Here, we show how kefir, a natural milk-fermenting community of prokaryotes (predominantly lactic and acetic acid bacteria) and yeasts (family Saccharomycetaceae), realizes stable coexistence through spatiotemporal orchestration of species and metabolite dynamics. During milk fermentation, kefir grains (a polysaccharide matrix synthesized by kefir microorganisms) grow in mass but remain unchanged in composition. In contrast, the milk is colonized in a sequential manner in which early members open the niche for the followers by making available metabolites such as amino acids and lactate. Through metabolomics, transcriptomics and large-scale mapping of inter-species interactions, we show how microorganisms poorly suited for milk survive in-and even dominate-the community, through metabolic cooperation and uneven partitioning between grain and milk. Overall, our findings reveal how inter-species interactions partitioned in space and time lead to stable coexistence.