Intracellular signaling regulators can be concentrated into membrane-free, higher-ordered protein assemblies to initiate protective responses during stress — a process known as phase transition. Here, we show that a phase transition of the C. elegans Toll/interleukin-1 receptor domain protein (TIR-1), a homolog of the mammalian sterile alpha and TIR motif-containing 1 (SARM1), primes host immune defenses when dietary sterols are limited to handle subsequent bacterial infection. TIR-1/SARM1 is an upstream component of the p38 PMK-1 pathway in intestinal cells, an innate immune defense and stress response pathway in metazoans. Under conditions of low cholesterol availability, multimerization and precipitation of TIR-1/SARM1 potentiates the intrinsic NAD+ glycohydrolase activity of this protein complex, increases p38 PMK-1 phosphorylation, and promotes pathogen clearance from the intestine. Dietary cholesterol is required for C. elegans to survive infection with pathogenic bacteria and to support development, fecundity, and lifespan. Thus, activation of the p38 PMK-1 pathway in sterol-deficient animals is an adaptive response that allows a metazoan host to anticipate environmental threats under conditions of essential metabolite scarcity.SIGNIFICANCE STATEMENTThe nematode C. elegans must consume dietary sterols to support growth and reproduction. However, access to dietary sterols in its natural habitat is not guaranteed and thus, nematodes have evolved mechanisms to promote survival in sterol-poor environments. Here, we demonstrate that activation of the p38 PMK-1 innate immune pathway in response to low sterol availability promotes clearance of a bacterial pathogen from the intestine. Pre-emptive activation of innate immune defenses occurs through a phase transition of TIR-1/SARM1, an upstream component of the p38 PMK-1 pathway, which activates its intrinsic NAD+ glycohydrolase activity. Thus, nematodes anticipate threats from infectious pathogens during a time when the animal is relatively susceptible to infection.