Unusually among lizards, Australian thick-tailed geckos (Nephrurus milii) aggregate in their diurnal retreat-sites. They continue to do this in the laboratory, even when excess shelters are available. We manipulated cues available to captive lizards to investigate three putative advantages to aggregation: enhanced social interactions, avoidance of predators, and control over rates of heat or water flux. Trials in which we prevented physical contact with conspecifics eliminated the aggregative response, suggesting that chemical and visual cues alone do not stimulate aggregation. Adding the scent of a predatory snake did not modify the degree of aggregation, nor did changes in mean ambient temperature or humidity. However, geckos exposed to decreasing temperatures huddled more closely with each other within shelters, and huddled geckos heated and cooled more slowly than did similar-sized solitary animals. We suggest that aggregative behaviour in Nephrurus milii has evolved to provide facultative control over rates of thermal exchange, an advantage because Nephrurus are large, live in cool variable climates, and occupy retreat-sites (rock crevices with high exposure to solar radiation) that experience highly variable thermal regimes. These attributes are shared by another group of lizards, the scincid genus Egernia, that exhibit the most complex sociality yet described among squamate reptiles. The initial stimulus for group formation in both geckos and skinks may have been thermal control, preadapting the scincids to further elaboration of social behaviour.