We model the optimal allocation of limited resources of an animal during a transient stressful event such as a cold spell or the presence of a predator. The animal allocates resources between the competing demands of combating the stressor and bodily maintenance. Increased allocation to combating the stressor decreases the mortality rate from the stressor, but if too few resources are allocated to maintenance, damage builds up. A second source of mortality is associated with high levels of damage. Thus, the animal faces a trade-off between the immediate risk of mortality from the stressor and the risk of delayed mortality due to the build up of damage. We analyze how the optimal allocation of the animal depends on the mean and predictability of the length of the stressful period, the level of danger of the stressor for a given level of allocation, and the mortality consequences of damage. We also analyze the resultant levels of mortality from the stressor, from damage during the stressful event, and from damage during recovery after the stressful event ceases. Our results highlight circumstances in which most mortality occurs after the removal of the stressor. The results also highlight the importance of the predictability of the duration of the stressor and the potential importance of small detrimental drops in condition. Surprisingly, making the consequences of damage accumulation less dangerous can lead to a reallocation that allows damage to build up by so much that the level of mortality caused by damage build up is increased. Similarly, because of the dependence of allocation on the dangerousness of the stressor, making the stressor more dangerous for a given level of allocation can decrease the proportion of mortality that it causes, while the proportion of mortality caused by damage to condition increases. These results are discussed in relation to biological phenomena.