Viviparity has evolved many times within squamate reptiles, mostly in cool climates, but the selective advantages of uterine retention of eggs remain obscure. Previous analyses have assumed that intrauterine incubation enhances offspring survival because of early hatching or protection of the young in utero. I suggest instead that prolonged uterine retention directly enhances hatchling viability, because eggs incubated at maternal body temperatures produce "better" hatchlings than do eggs incubated at normal nest temperatures. To test this idea, I incubated eggs of two species of montane scincid lizards from southeastern Australia (Bassiana duperreyi and Nannoscincus maccoyi) under thermal regimes designed to simulate temperatures in nests and maternal oviducts. Hatchling phenotypes were substantially affected by incubation temperatures. The variables affected by incubation at maternal versus nest thermal regimes include the hatchling's morphology (body size, relative tail length), running speed in a laboratory raceway, and behavior (activity levels, frequency of basking, antipredator tactics). The running speeds of hatchling B. duperreyi were also influenced by brief retention at "maternal" temperatures after the usual time of laying (a presumed intermediate stage for the evolution of viviparity) and by body temperatures of females prior to oviposition. Hence, a direct effect of uterine retention on offspring viability offers a plausible selective advantage for the evolution of viviparity in squamate reptiles and possibly in other vertebrates and invertebrates also. More generally, the expression of phenotypic plasticity may play an integral role in the adaptive modification of life-history phenomena.