Vertical migration of Daphnia represents the best-studied predator-avoidance behaviour known; yet the mechanisms underlying the choice to migrate require further investigation to understand the role of environmental context. To investigate the optimal habitat choice of Daphnia under fish predation pressure, first, we selected the individuals exhibiting strong migration behaviour. The animals collected from the hypolimnion during the daytime were significantly larger, being more conspicuous, and in turn performed stronger diel vertical migration (DVM) when exposed to fish cue. We called them strong migrants. Second, we provided the strong migrant D. pulex with food at high and intermediate (1 and 0.4 mg C l(-1), respectively) levels, which were well above the incipient limiting level and of high quality. They traded the benefits of staying in the warm water layer and moved down to the cold water in response to fish cue indicating fish predation. The availability of food allowed the animals to stay in the cold hypolimnion. However, at the low food level (0.1 mg C l(-1)), which is an additional constraint on fitness, Daphnia moved away from the cold hypolimnion. Poor food condition resulted in strong migrant Daphnia to cease migration and remain in the upper warmer water layer. Although temperature is known to be a more important cost factor of DVM than food, our results clearly show that this is only true as long as food is available. It becomes clear that food availability is controlling the direction of vertical positioning when daphnids experience a dilemma between optimising temperature and food condition while being exposed to fish cue. Then they overlook the predation risk. Thus, the optimal habitat choice of Daphnia appears to be a function of several variables including temperature, food levels and fish predation.