Theoretical models of anti-predator escape behaviour suggest that prey may adjust their escape response such that the optimal flight distance is the point at which the costs of staying exceed the costs of fleeing. Anti-predatory decisions should be made based also on consequences for long-term expected fitness, such as the costs of refuge use. For example, in lizards, the maintenance of an optimal body temperature is essential to maximize physiological processes. However, if unfavourable thermal conditions of refuges can decrease the body temperature of lizards, their escape decision should be influenced by refuge conditions. Analyses of the variation in flight distances and emergence latency from a refuge for the lizard Lacerta monticola under two different predation risk levels, and their relationship with the thermal environment, supported these predictions. When risk increased, lizards had longer emergence latencies, and thus costs of refuge use increased (a greater loss of time and body temperature). In the low-risk situation, lizards that were farther from the refuge had longer flight distances, whereas thermal conditions were less important. When risk increased, lizards had longer flight distances when refuges were farther off, but also when the external heating rate and the refuge cooling rate were lower. The results suggest that, in addition to the risk of predation, expected long-term fitness costs of refuges can also affect escape decisions.