Understanding environmental influences on sex ratios is important for the study of the evolution of sex-determining mechanisms and for evaluating the effects of global warming and chemical pollution. Fishes exhibit sexual plasticity, but the underlying mechanisms of environmental effects on their reproduction are unclear even in the well-established teleost research model, the zebrafish. Here we established the conditions to study the effects of elevated temperature on zebrafish sex. We showed that sex ratio response to elevated temperature is family-specific and typically leads to masculinization (female-to-male sex reversal), resulting in neomales. These results uncovered genotype-by-environment interactions that support a polygenic sex determination system in domesticated (laboratory) zebrafish. We found that some heat-treated fish had gene expression profiles similar to untreated controls of the same sex, indicating that they were resistant to thermal effects. Further, most neomales had gonadal transcriptomes similar to that of regular males. Strikingly, we discovered heat-treated females that displayed a normal ovarian phenotype but with a "male-like" gonadal transcriptome. Such major transcriptomic reprogramming with preserved organ structure has never been reported. Juveniles were also found to have a male-like transcriptome shortly after exposure to heat. These findings were validated by analyzing the expression of genes and signaling pathways associated with sex differentiation. Our results revealed a lasting thermal effect on zebrafish gonads, suggesting new avenues for detection of functional consequences of elevated temperature in natural fish populations in a global warming scenario.A major paradox in developmental biology is the lack of conservation of sex-determining mechanisms even in closely related taxa (1). Thus, in mammals and birds, sex is genetically canalized by a chromosomal sex determination (CSD) system of male (XX/XY in mammals) or female (ZW/ZZ in birds) heterogamety, driven by the action of a master sex-determining gene: sry in mammals and dmrt1 in birds (1). In contrast, fish sex can be very plastic, with the combination of genetic and environmental influences (2). In addition to fish species with CSD, there are species with polygenic sex determination (PSD), in which sex depends on the combined action of several promale and profemale genetic factors, and species with temperature-dependent sex determination (TSD) (3). Understanding how the environment influences sex ratios in vertebrates is of fundamental importance in the study of the evolution of sex-determining mechanisms (4, 5). It is also of practical relevance in evaluating the effects of climate change and chemical pollution (6, 7).The effects of temperature on gene expression during sex differentiation have been investigated in different teleost species, including the African catfish, Clarias gariepinus (8), European sea bass, Dicentrarchus labrax (9, 10), Japanese flounder, Paralichthys olivaceus (11), pejerrey, Odontesthes...