The release of hatchery-reared fishes for restoring threatened and endangered populations is one of the most controversial issues in applied ecology. A central issue has been to determine whether releases cause extinction of local wild populations. This may arise either through domesticated or non-local fishes hybridizing with wild fishes, or through inappropriate behavioural interactions; for example, many hatchery fishes show exaggerated aggressive and competitive behaviour and out-compete wild counterparts. The impact of the impoverished hatchery environment in shaping behaviour is only now receiving attention. Attempts to counteract hatchery-related behavioural deficiencies have utilized intensive training programmes shortly before the fishes are released. However, we show here that simple exposure to variable spatial and foraging cues in the standard hatchery environment generates fishes with enhanced behavioural traits that are probably associated with improved survival in the wild. It appears that fishes need to experience a varying and changeable environment to learn and develop flexible behaviour. Using variable hatchery rearing environments to generate suitable phenotypes in combination with a knowledge of appropriate local genotypes, rehabilitation of wild fishes is likely to succeed, where to date it has largely failed.