Antipredator tactics that promote survival should be under strong selection. Therefore, apparently ‘risky’ behaviours should only be stably maintained in a population if they confer a fitness advantage. Here, we experimentally examined the adaptive function of tail waving, an apparently risky antipredator behaviour in hatchling Australian three-lined skinks, Bassiana duperreyi, by determining the effects of running speed, incubation temperature, sex and parental environment on the frequency of tail waving in laboratory trials. We found that hatchling running performance predicted tail-waving behaviour independent of the other factors, where slow individuals tail-waved more frequently than fast individuals. These data support the hypothesis that tail waving functions to deflect predatory attacks towards the tail, an expendable body part in this and other lizard species. Moreover, we suggest that tail waving in this species occurs as a ‘last resort’ in response to fatigue. In addition, our results allow us to reject the hypothesis that tail waving primarily functions as a pursuit-deterrent signal in hatchling B. duperreyi. Deflection is likely to have been the ancestral function of antipredator tail displays in lizards, with pursuit deterrence being a derived and less common function.