Climate change is generating an intensification of extreme environmental conditions, including frequent and severe droughts  that have been associated with increased social conflict in vertebrates [2–4], including humans . Yet, fluctuating climatic conditions have been shown to also promote cooperative behavior and the formation of vertebrate societies over both ecological and evolutionary timescales . Determining when climatic uncertainty breeds social discord or promotes cooperative living (or both) is fundamental to predicting how species will respond to anthropogenic climate change. In light of this, our limited understanding of the order of evolutionary events—that is, whether harsh environments drive the evolution of sociality  or, alternatively, whether sociality facilitates the invasion of harsh environments —and of how cooperation and conflict coevolve in response to environmental fluctuation represent critical gaps in knowledge. Here, we perform comparative phylogenetic analyses on Australian rodents (Muridae: Hydromyini) and show that sociality evolves only under harsh conditions of low rainfall and high temperature variability and never under relatively benign conditions. Further, we demonstrate that the requirement to cooperate under harsh climatic conditions generates social competition for reproduction within groups (reflected in the degree of sexual dimorphism in traits associated with intrasexual competition ), which in turn shapes the evolution of body size dimorphism. Our findings suggest that as the environment becomes more severe , the resilience of some species may hinge on their propensity to live socially, but in so doing, this is likely to affect the evolution of traits that mediate social conflict. Firman et al. show that sociality evolves under harsh conditions of low rainfall and high temperature variability, never under benign climatic conditions in Australian rodents. They also demonstrate that climate does not directly influence social conflict, but instead shapes competitive phenotypes by favoring the evolution of sociality.