Anti-predator behaviour in overwintering redshanks on an estuary in south-east Scotland was studied in the context of a very high mortality rate due almost entirely to predation by raptors. Attacks on redshank flocks of different sizes and by different species of raptor were observed frequently. Flocking reduced an individual redshank's probability of being killed by sparrowhawks, Accipiter nisus, and peregrines, Falco peregrinus. Larger flocks were preferentially attacked, but an attack was significantly more likely to succeed on a smaller flock. Within a larger flock a redshank was less at risk through the 'dilution' effect, vigilance effects (which were a direct consequence of flock size) and probably also the 'confusion' effect. A large redshank flock was less likely to fly immediately than a small flock on appearance of a sparrowhawk. Redshanks did not gain any foraging benefits within larger flocks; the number of swallows per unit time remained approximately constant while the number of unsuccessful picks at the ground increased with flock size. Reduced individual risk of predation appeared to be the main reason for flocking.