Comparison of mitochondrial and morphological divergence in eight populations of a widespread leaf-litter skink is used to determine the relative importance of geographic isolation and natural selection in generating phenotypic diversity in the Wet Tropics Rainforest region of Australia. The populations occur in two geographically isolated regions, and within each region, in two different habitats (closed rainforest and tall open forest) that span a well characterized ecological gradient. Morphological differences among ancient geographic isolates (separated for several million years, judging by their mitochondrial DNA sequence divergence) were slight, but morphological and life history differences among habitats were large and occurred despite moderate to high levels of mitochondrial gene flow. A field experiment identified avian predation as one potential agent of natural selection. These results indicate that natural selection operating across ecological gradients can be more important than geographic isolation in similar habitats in generating phenotypic diversity. In addition, our results indicate that selection is sufficiently strong to overcome the homogenizing effects of gene flow, a necessary first step toward speciation in continuously distributed populations. Because ecological gradients may be a source of evolutionary novelty, and perhaps new species, their conservation warrants greater attention. This is particularly true in tropical regions, where most reserves do not include ecological gradients and transitional habitats.