We estimate that stereotypies are currently displayed by over 85 million farm, laboratory and zoo animals worldwide. This paper investigates their reliability as welfare indicators, by surveying studies relating stereotypy to other welfare measures and by analysing the mechanisms underlying this behaviour. Where data exist, most (approximately 68%) situations that cause/increase stereotypies also decrease welfare. Stereotypy-eliciting situations are thus likely to be poor for welfare, although exceptions exist. Within such an environment, however, most (approximately 60%) accounts link individual stereotypy performance with improved welfare (of approximately 20% linking it with reduced welfare). Thus, in a sub-optimal environment, non-stereotyping or low-stereotyping individuals could well have the poorest welfare, although again exceptions exist. Examining the mechanisms underlying stereotypy performance, we discuss four processes that could account for these complex links between stereotypy and welfare. Beneficial consequences from performing the specific source-behaviour of the stereotypy ('do-it-yourself enrichment'), or arising from repetition per se ('mantra effects'), may ameliorate welfare in poor environments. In addition, stereotypies that have become centrally controlled (habit-like), or that arise from autistic-like changes in the control of all behaviour (perseveration), are likely to be unreliable indicators of current state because they can be elicited by, or persist in, circumstances that improve welfare. To refine the role of stereotypy in welfare assessment, we suggest the collection of specific additional data to reveal when any of these four processes is acting. Until such research increases our understanding, stereotypies should always be taken seriously as a warning sign of potential suffering, but never used as the sole index of welfare; non-stereotyping or low-stereotyping individuals should not be overlooked or assumed to be faring well; simple measures of frequency should not be used to compare stereotypies that differ in age, form, or the biological or experiential characteristics of the performing animal; enrichments that do not immediately reduce stereotypies should not be assumed failures with respect to welfare; and finally, stereotypies should not be reduced by means other than tackling their underlying motivations.