We report the death of 30 wild Barbary macaques, living in two groups, during an exceptionally cold and snowy winter in the Middle Atlas Mountains, Morocco. We examined whether an individual's time spent feeding, the quality and number of its social relationships, sex and rank predicted whether it survived the winter or not. The time an individual spent feeding and the number of social relationships that an individual had in the group were positive and significant predictors of survival. This is the first study to show that the degree of sociality affects an individual's chance of survival following extreme environmental conditions. Our findings support the view that sociality is directly related to an individual's fitness, and that factors promoting the establishment and maintenance of social relationships are favoured by natural selection.