Embryonic conditions may limit the distributions of egg-laying ectotherms, and recent research suggests that nesting mothers of wide-ranging species may use a number of factors to compensate for differing climates. However, while variation in temporal factors across environmental gradients are common or pervasive (i.e. seasonal timing of nesting), similar evidence for spatial factors is rare (e.g. aspect, openness and depth of nest sites). I tested the idea that a wide-ranging lizard, the Australia water dragon (Physignathus lesueurii), uses nest depth to counter climate differences along a temperature cline at their cold-end range margin. Two measures of nest depth were significantly, inversely related to elevation across six populations spanning 700 m. Elevation explained 83–86% of the variation in nest depth. These findings support a thermal compensatory mechanism for this pattern, although soil moisture compensation is plausible. My results directly support a recent, untested prediction that the evolution of viviparity in reptiles is preceded by a behavioural shift towards increasingly superficial nest sites in cold climates, followed by selection for increased egg retention to avoid temperature extremes. However, in the present study egg desiccation rates increased with increasing elevation in a dry year, suggesting that increased egg retention may evolve in response to lethal hydric conditions, rather than lethal temperatures. When considered alongside recent research, the present study indicates that water dragons possess several mechanisms for adjusting to climate change.