Classical views of trophic cascades emphasize the primacy of consumptive predator effects on prey populations to the transmission of indirect effects [density-mediated indirect interactions (DMIIs)]. However, trophic cascades can also emerge without changes in the density of interacting species because of non-consumptive predator effects on prey traits such as foraging behaviour [trait-mediated indirect interactions (TMIIs)]. Although ecologists appreciate this point, measurements of the relative importance of each indirect predator effect are rare. Experiments with a three-level, rocky shore food chain containing an invasive predatory crab (Carcinus maenas), an intermediate consumer (the snail, Nucella lapillus) and a basal resource (the barnacle, Semibalanus balanoides) revealed that the strength of TMIIs is comparable with, or exceeds, that of DMIIs. Moreover, the sign and strength of each indirect predator effect depends on whether it is measured in risky or refuge habitats. Because habitat shifts are often responsible for the emergence of TMIIs, attention to the sign and strength of these interactions in both habitats will improve our understanding of the link between individual behaviour and community dynamics.