Accurate measurements of prey availability are vital to our understanding of foraging behaviour, particularly prey selectivity. In the present study, observations of shorebirds foraging for fiddler crabs on intertidal mudflats demonstrate that prey availability depends both on the temporal variation in crab activity and on the crabs' responses to the presence of foraging shorebirds. Our results suggest that measurements of prey availability that do not specifically account for prey activity patterns and their responses to predators are neccessarily inaccurate. Furthermore, our results also show that tests for foraging selectivity are extremely sensitive to the way in which prey availability is measured and can even indicate active prey selectivity when more accurate measures of prey availability show predators to be non-selective. Because inaccurate measures of food resources greatly reduce our ability to detect food preferences, greater care must be taken to account for prey activity patterns and their responses to predators in measurements of prey availability. (C) 1998 The Association for the Study of Animal Behaviour.