ABSTRACT: Background: Sex in fish is plastic and in several species can be influenced by environmental factors. In sensitive species, elevated temperatures have a masculinizing effect. Previous studies on the effects of temperature on gene expression have been restricted to a few cognate genes, mostly related to testis or ovarian development, and analyzed in gonads once they had completed the process of sex differentiation. However, studies on the effect of temperature at the whole gonadal transcriptomic level are scarce in fish and, in addition, temperature effects at the time of sex differentiation at the transcriptomic level are also unknown. Here, we used the European sea bass, a gonochoristic teleost with a polygenic sex determination system influenced by temperature, and exposed larvae to elevated temperature during the period of early gonad formation. Transcriptomic analysis of the gonads was carried out about three months after the end of temperature exposure, shortly after the beginning of the process of sex differentiation. Results: Elevated temperature doubled the number of males with respect to untreated controls. Transcriptomic analysis of early differentiating female gonads showed how heat caused: 1) an up-regulation of genes related to cholesterol transport (star), the stress response (nr3c1) and testis differentiation (amh, dmrt, etc.), 2) a decrease in the expression of genes related to ovarian differentiation such as cyp19a1a, and 3) an increase in the expression of several genes related to epigenetic regulatory mechanisms (hdac11, dicer1, ehmt2, jarid2a, pcgf2, suz12, mettl22). Conclusions: Taken together, the results of this study contribute to the understanding of how the early environment sets permanent changes that result in long-lasting consequences, in this case in the sexual phenotype. Results also show the usefulness of comparing the effects of heat on the behavior of cognate genes related to sex differentiation as well as that of genes involved in establishing and maintaining cell identity through epigenetic mechanisms.