Animals should be able to adjust their behavior by tracking changes in predation risk level continuously. Many animals show a pattern of intermittent locomotion with short pauses that may increase detection and vigilance of predators. These locomotor patterns may depend on the microhabitat structure, which affect predation risk levels. We examined in detail in the laboratory the characteristics of spontaneous locomotion, scanning behavior, and the escape performance of Psammodromus algirus lizards moving in two different microhabitats (leaf litter patches and open sand areas). Results showed that in leaf litter, lizards moved at slower speed and had shorter bursts of locomotion both in distance and duration, than in sand substrates. This locomotor pattern allowed lizards to increase scanning rate and total time spent in vigilance behavior. When lizards were forced to flee, they escaped to longer distances and during more time in open sand areas, but lizards were able to attain similar escape speed in the two substrates. Lizards may be able to compensate the cost of moving between different microhabitats with different predation risk by behaviorally changing their locomotor and vigilance patterns. However, complex interactions between the visibility of lizards to predators and the ability of lizards to detect predators, together with the need of attending simultaneously to other conflicting demands, may lead to apparently non-intuitive solutions in locomotor patterns and the rate of vigilance behavior.