Escape studies often focus on one variable, but tactics and refuge use vary with microhabitats, exposure, distance to refuge, and temperature. We studied these effects and effects of microhabitats and risk factors (distance from refuge, temperature) on flight initiation distance (FID, distance between predator and prey when escape begins) and distance fled (DF) in the lizard Sceloporus virgatus. FID increased as distance to refuge increased and temperature decreased. DF increased as FID increased, supporting the hypothesis that individual differences in boldness are consistent among encounter phases. Refuges were rock crevices, trees, logs, and grass clumps. Interhabitat differences in FID and DF matched those in distance to refuge. FID was longer for lizards on rocks and ground than trees due to proximity to and use of refuge. Lizards on trees rarely changed microhabitats, moving to the far side and unpredictably up or down. Lizards on slopes fled long distances up slopes. Most lizards on rocks entered crevices or switched microhabitats. Lizards on ground usually changed microhabitats. Optimal escape theory accurately predicted effects of risk on FID, but initial microhabitats and final microhabitats and refuges affected tactics, FID and DF. DF was affected by risk, being longer when lizards remained visible.