Although most organisms thermoregulate behaviorally, biologists still cannot easily predict whether mobile animals will thermoregulate in natural environments. Current models fail because they ignore how the spatial distribution of thermal resources constrains thermoregulatory performance over space and time. To overcome this limitation, we modeled the spatially explicit movements of animals constrained by access to thermal resources. Our models predict that ectotherms thermoregulate more accurately when thermal resources are dispersed throughout space than when these resources are clumped. This prediction was supported by thermoregulatory behaviors of lizards in outdoor arenas with known distributions of environmental temperatures. Further, simulations showed how the spatial structure of the landscape qualitatively affects responses of animals to climate. Biologists will need spatially explicit models to predict impacts of climate change on local scales.behavioral thermoregulation | thermal heterogeneity | thermal ecology | spatial ecology | individual-based model T he rapid warming of many environments has generated great concern about the potential impacts on biodiversity (1). Genetic changes in response to anthropogenic warming seem rare (2) or limited (3), and many species have shifted habitats over space and time (4-7). Indeed, facultative behavioral strategies are the primary means by which many species cope with changing environments (8). In a warming world, behavioral thermoregulation could enable most organisms to maintain body temperatures that promote physiological performance (9-11). However, excessive warming constrains thermoregulation, potentially leading to extinction of populations. At local scales, recent warming apparently caused numerous extinctions by limiting the duration of foraging by lizards (12). According to mechanistic models, thermal constraints on activity will play a major role in biological invasions and local extinctions (13-16). Given constraints on thermoregulatory behaviors, some have predicted that global warming could eliminate more than 40% of lizard species by 2080 (12).Such projections, although dire, underestimate the impacts of climate change by failing to consider costs of thermoregulation that are imposed by environmental heterogeneity (10,17,18). Most models assume that an animal can access either unshaded michrohabitats or shaded microhabitats without using energy to search for and move between them (14, 19). As long as the animals prefers a body temperature within the range of operative environmental temperatures, an animal can thermoregulate by shuttling between microhabitats at no cost. Given this assumption, researchers combine meteorological data and biophysical equations to calculate the expected performance of an organism in specific climates. However, thermoregulatory behaviors impose costs such as energy loss, predation risk, and missed opportunities for foraging and breeding (20), which researchers have ignored when modeling the biological impacts of clim...