Stress response JNK signalling is important for cell death-induced regeneration. Here the authors show in adultDrosophilaenterocytes that ATF3 regulates the expression of Raw, a JNK antagonist, to control intestinal regeneration and barrier function in response to infection.