Bacteria show remarkable adaptability in the face of antibiotic therapeutics. Resistance alleles in drug target-specific sites and general stress responses have been identified in individual end-point isolates1,2,3,4,5,6,7. Less is known, however, about the population dynamics during the development of antibiotic-resistant strains. Here we follow a continuous culture of Escherichia coli facing increasing levels of antibiotic and show that the vast majority of isolates are less resistant than the population as a whole. We find that the few highly resistant mutants improve the survival of the population’s less resistant constituents, in part by producing indole, a signalling molecule generated by actively growing, unstressed cells8. We show, through transcriptional profiling, that indole serves to turn on drug efflux pumps and oxidative-stress protective mechanisms. The indole production comes at a fitness cost to the highly resistant isolates, and whole-genome sequencing reveals that this bacterial altruism is made possible by drug-resistance mutations unrelated to indole production. This work establishes a population-based resistance mechanism constituting a form of kin selection9 whereby a small number of resistant mutants can, at some cost to themselves, provide protection to other, more vulnerable, cells, enhancing the survival capacity of the overall population in stressful environments.