Productivity is a key driver of ecosystem structure and function, so long-term studies are critical to understanding ecosystems with high temporal variation in productivity. In some deserts, productivity, driven by moisture availability, varies immensely over time (rainfall) and space (landscape factors). At high productivity, species richness is expected to be driven in opposing directions by abundance (More Individuals Hypothesis - MIH) and competition. While studies investigating the impacts of spatial variation in productivity on community structure are common, the impacts of temporal variability on productivity are poorly understood. We tested how well rainfall predicted the activity, species numbers and assemblage composition of ants and if responses were moderated by landscape position. We also asked whether the number of species (richness per sampling unit and estimated species richness) responded directly to rainfall or was moderated by ant activity or competition from dominant ants. Over a 22-year period, when annual rainfall fluctuated between 79 mm and 570 mm, we sampled ants using pitfall traps in paired dune and swale habitats in the Simpson Desert, Australia. We used climate records over this period to model changes in ant assemblages. Activity of dominant ants responded primarily to long-term rainfall, increasing exponentially, while subordinate ants responded to short-term weather and time. Consistent with the MIH, the number of ant species was best predicted by activity, particularly that of subordinate ants. Activity of dominant ants had a declining positive effect on numbers of species. Landscape position strongly predicted species composition, while long-term rainfall determined composition at genus level but not species level. Over time, species composition fluctuated, but several genera consistently increased in activity. Productivity moderators such as long-term rainfall and landscape position are key drivers of ant activity and composition in the study ecosystem, acting indirectly on numbers of species. Numbers of species were explained largely by ant activity, making a strong case for the MIH, but not competition. Longer periods of low rainfall may indirectly reduce species richness in desert ecosystems. However, a trend to increasing richness over time may indicate that conservation management can ameliorate this impact.