AbstractChanging climatic conditions are shaping how density mediates resource competition. Colonies of the seed‐eating red harvester ant, Pogonomyrmex barbatus, live for about 30 years in desert grassland. They compete with conspecific neighbors for foraging area in which to search for seeds. This study draws on a long‐term census of a population of about 300 colonies from 1988 to 2019 at a site near Rodeo, New Mexico, USA. Rainfall was high in the first decade of the study, and then declined as a severe drought began in about 2001–2003. We examine the effects on colony survival and recruitment of the spatial configuration of the local neighborhood of conspecific neighbors, using Voronoi polygons as a measure of a colony's foraging area, and consider how changing rainfall influences the effects of local neighborhoods. The results show that a colony's chances of surviving to the next year depend on its age and on the foraging area available in its local neighborhood. Recruitment, measured as a founding colony's chance of surviving to be 1 year old, depends on rainfall. In the earlier years of the study, when rainfall was high, colony numbers increased, and then began to decline after about 1997–1999, apparently due to crowding. As rainfall decreased, beginning in about 2001–2003, recruitment declined, and so did colony survival, leading to a trend toward earlier colony death which was most pronounced in 2016. As rainfall declined, apparently decreasing food availability, more foraging area was needed to sustain a colony: although the number of colonies declined, the impact of crowding by intraspecific neighbors increased. These processes maintain overdispersion on the scale of about 8 m, with transient clustering at larger spatial scales. In addition, other factors besides crowding, such as the colony's regulation of foraging activity to manage water loss, appear to contribute to a colony's survival. The adaptive capacity for selection on the collective behavior that regulates foraging activity may determine how the population responds to ongoing climate change and drought.