Redshanks Tringa totanus that are preyed upon by Sparrowhawks Accipiter nisus at the Tyninghame Estuary, Firth of Forth, Scotland, provide an example of how the starvation–predation risk trade-off results in mortality. In this trade-off, animals cannot always optimize anti-predation behaviour because anti-predation behaviours, such as avoiding predators, are usually incompatible with foraging behaviours that might maximize intake rates. Therefore, as animals compensate for starvation risk, predation risk increases. Sparrowhawks are the main direct cause of death in Redshanks at Tyninghame. Sparrowhawk attack rate is determined by Redshank vulnerability, and vulnerability decreases as group size and distance to cover increase, and probably as spacing decreases. But reduction of predation vulnerability reduces feeding rate because areas away from cover are less food-profitable and grouping results in increased interference competition. Increased starvation risk in midwinter means Redshanks are forced to feed on highly profitable prey, Orchestia amphipods, the behaviour of which means that Redshanks are forced to feed vulnerably, in widely spaced groups, close to predator-concealing cover. Therefore, it is the constraints that limit the ability of Redshanks to feed in large, dense flocks away from cover that ultimately lead to mortality. We investigate this hypothesis further by testing the prediction that mortality can be predicted directly by cold weather and population density. We demonstrate that the overall number of Redshanks and the proportion of Redshanks killed increase in cold months when controlling for population size. We also demonstrate that the proportion of Redshanks killed increases when there are fewer Redshanks present, because the success rate of hunting Sparrowhawks increases, probably because effective management of predation risk through flocking is constrained by a low population size. Redshanks therefore provide an example of how directly mortality caused by predation arises from starvation risk and other constraints that prevent animals from optimizing anti-predation behaviour.