Animals often prefer areas containing physical structure, and population density often increases with structural complexity, presumably because physical complexity in habitats may offer protection from predators and aggressive competitors. Consequently, increased habitat complexity often results in reduced territory size, lower aggression levels and reduced resource monopolisation by dominants. If behavioural plasticity is limited at early life stages, increased habitat complexity may reduce the relative fitness of aggressive, dominant strategies. Here we tested this hypothesis in an experiment on newly emerged brown trout (Salmo trutta) fry. We show, for the first time, that increased habitat complexity reduces the fitness (i.e. growth rate) of aggressive dominant individuals in relation to subordinates, and that this relation is reversed in simple habitats. Variation in environmental complexity may thus induce fluctuating selective pressures, maintaining behavioural variation in natural populations and allowing subordinate and dominant strategies to coexist.