One of the hypotheses of growing interest in studies of responses to thermal environments suggests that trade-offs and other trait associations may be altered by temperature. Here, the commonly observed positive association between body size and longevity was examined at two adult test temperatures, 14 degrees C and 25 degrees C, in cold-stress-selected lines (S) and their controls (C) in 25 degrees C-reared Drosophila melanogaster. Thorax length (TL) and developmental time (DT) were also scored in 25 degrees C-reared individuals before and after one generation of truncation selection on longevity. The topography of the selection surface that relates longevity to thorax and wing size was temperature dependent and differed both between lines and between sexes. Longevity increased monotonically with body size (TL) in C and S females at 25 degrees C but, surprisingly, longevity decreased with body size in S individuals at 14 degees C. Body size did not diverge between S and C lines and showed no response to longevity selection. However, DT increased by 25 degrees C-longevity selection in C individuals and decreased by 14 degrees C-longevity selection in S individuals. These results suggest that trait associations (including the commonly observed trade-off between body size and DT) can greatly depend on temperature, as a shift in the sign of the correlation is possible at low temperature. Genotype x temperature interaction is an important source of variation in the relationship between soma size and longevity.