BackgroundAntagonistic interactions mediated by antibiotics are strong drivers of bacterial community dynamics which shape biodiversity. Colicin production by Escherichia coli is such an interaction that governs intraspecific competition and is involved in promoting biodiversity. It is unknown how environmental cues affect regulation of the colicin operon and thus influence antibiotic-mediated community dynamics.ResultsHere, we investigate the community dynamics of colicin-producing, -sensitive, and -resistant/non-producer E. coli strains that colonize a microfabricated spatially-structured habitat. Nutrients are found to strongly influence community dynamics: when growing on amino acids and peptides, colicin-mediated competition is intense and the three strains do not coexist unless spatially separated at large scales (millimeters). Surprisingly, when growing on sugars, colicin-mediated competition is minimal and the three strains coexist at the micrometer scale. Carbon storage regulator A (CsrA) is found to play a key role in translating the type of nutrients into the observed community dynamics by controlling colicin release. We demonstrate that by mitigating lysis, CsrA shapes the community dynamics and determines whether the three strains coexist. Indeed, a mutant producer that is unable to suppress colicin release, causes the collapse of biodiversity in media that would otherwise support co-localized growth of the three strains.ConclusionsOur results show how the environmental regulation of an antagonistic trait shapes community dynamics. We demonstrate that nutrient-responsive regulation of colicin release by CsrA, determines whether colicin producer, resistant non-producer, and sensitive strains coexist at small spatial scales, or whether the sensitive strain is eradicated. This study highlights how molecular-level regulatory mechanisms that govern interference competition give rise to community-level biodiversity patterns.Electronic supplementary materialThe online version of this article (doi:10.1186/s12915-014-0068-2) contains supplementary material, which is available to authorized users.