How do resource uncertainty and intergroup conflict affect intragroup cooperation over resources in the common pool dilemmas? Does a danger of sudden resource depletion encourage random acts of violence? There are concerns that climate change will escalate conflicts over, and the scarcity of, renewable resources, which are already under threat or in a state of decline. However, we know surprisingly little about the impact of uncertainty on intergroup conflict over resources. In this paper, we present experimental evidence from a mixed design experiment with two-between-group factors: (1) the presence (or absence) of shocks that can destroy a part of resources; and (2) the availability of intergroup conflict. We find that random shocks encourage resource conservation within groups. The positive impact of resource uncertainty on resource conservation disappears in the presence of conflict. It seems that subjects protect themselves from resource exhaustion in the presence of shocks by engaging in conflict and taking resources from the out-group instead of reducing extraction. In general, conflict promotes intragroup cooperation, but this is conditional on the outcomes of past conflicts. In particular, groups harvest more after wins, and only reduce extraction after losing resources in conflict.