Bacteria, transformed into dormant spores, can survive millions of years in extreme environments, threatening human life in the form of food poisoning and the biological weapon anthrax. But understanding how bacteria adapt to hostile environments has largely remained a mystery—until now.