We study the influence that resource availability has on cooperation in the context of hunter-gatherer societies. This paper proposes a model based on archaeological and ethnographic research on resource stress episodes, which exposes three different cooperative regimes according to the relationship between resource availability in the environment and population size. The most interesting regime represents moderate survival stress in which individuals coordinate in an evolutionary way to increase the probabilities of survival and reduce the risk of failing to meet the minimum needs for survival. Populations self-organise in an indirect reciprocity system in which the norm that emerges is to share the part of the resource that is not strictly necessary for survival, thereby collectively lowering the chances of starving. Our findings shed further light on the emergence and evolution of cooperation in hunter-gatherer societies.