Lysogeny by temperate phages provides novel functions for bacteria and shelter for phages. However, under conditions that activate the phage lytic cycle, the benefit of lysogeny becomes a paradox that poses a threat for bacterial population survival. Using Escherichia coli lysogens for Shiga toxin (Stx) phages as model, we demonstrate how lysogenic bacterial populations circumvent extinction after phage induction. A fraction of cells maintains lysogeny, allowing population survival, whereas the other fraction of cells lyse, increasing Stx production and spreading Stx phages. The uninduced cells were still lysogenic for the Stx phage and equally able to induce phages as the original cells, suggesting heterogeneity of the E.coli lysogenic population. The bacterial population can modulate phage induction under stress conditions by the stress regulator RpoS. Cells overexpressing RpoS reduce Stx phage induction and compete with and survive better than cells with baseline RpoS levels. Our observations suggest that population heterogeneity in phage induction could be widespread among other bacterial genera and we propose this is a mechanism positively selected to prevent the extinction of the lysogenic population that can be modulated by environmental conditions.