We measured temperature-dependent fertility selection on body size in Drosophila pseudoobscura in the laboratory. One hundred single females of each of the three karyotypes involving the 'sex-ratio' (SR) and the standard (ST) gene arrangement on the sex chromosome laid eggs at either 18 or 24 degrees C. The experiment addressed the following hypotheses: (a) Fertility selection on body size is weaker at the higher temperature, explaining in part why genetically smaller flies appear to evolve in populations at warmer localities. (b) Homokaryotypic SR females are less fecund than homokaryotypic ST females, possibly mediated by the effect of body size on fertility, explaining the low frequencies of SR despite its strong advantage due to meiotic drive. The data were also expected to shed light on a mechanism for the evolution of plasticity of body size through fertility selection in environments with an unpredictable temperature regime. Hypothesis (a) was clearly refuted because phenotypically larger ST females had an even larger fertility surplus at the higher temperature and, more importantly, the genetic correlation between fertility and body size disappeared at the lower temperature. As to (b), we found that temperature affects fertility directly and indirectly through body size such that ST and SR females were about equally fecund at both temperatures, although different in size and size-adjusted fertility. We observed heterosis for both size and fertility, which might stabilize the polymorphism in nature. The reaction norms of body size to the temperature difference were steeper for ST females than for SR females, implying that fertility selection could change phenotypic plasticity of body size in a population. Selection on body size depended not only on the temperature, but also on the karyotypes, suggesting that models of phenotype evolution using purely phenotypic fitness functions may often be inadequate.