The small molecule alarmone (p)ppGpp mediates bacterial adaptation to nutrient deprivation by altering the initiation properties of RNA polymerase (RNAP). ppGpp is generated inEscherichia coliby two related enzymes, RelA and SpoT. We show that ppGpp is robustly, but transiently, induced in response to DNA damage and is required for efficient nucleotide excision DNA repair (NER). This explains whyrelA-spoT-deficient cells are sensitive to diverse genotoxic agents and ultraviolet radiation, whereas ppGpp induction renders them more resistant to such challenges. The mechanism of DNA protection by ppGpp involves promotion of UvrD-mediated RNAP backtracking. By rendering RNAP backtracking-prone, ppGpp couples transcription to DNA repair and prompts transitions between repair and recovery states.