Sex is a long-standing evolutionary enigma. Although the majority of eukaryotes reproduce sexually at least sometimes [1-3], the evolution of sex from an asexual ancestor has been difficult to explain because it requires sexually reproducing lineages to overcome the manifold costs of sex, including the destruction of favorable gene combinations created by selection [4, 5]. Conditions for the evolution of sex are much broader if individuals can reproduce either sexually or asexually (i.e., facultative sex) and allocate disproportionately more resources to sex when their fitness is low (fitness-associated-sex or FAS [6-10]). Although facultatively sexual organisms have been shown to engage in more sex when stressed , direct evidence for FAS is lacking. We provide evidence using 53 genotypes of the filamentous fungus Aspergillus nidulans in a reciprocal transplant experiment across three environments. Different genotypes achieved highest fitness in different environments and genotypes invested relatively more in sex in environments in which their fitness was lower, showing that allocation to sexual reproduction is a function of how well-adapted a genotype is to its environment. FAS in A. nidulans is unlikely to have evolved as a strategy to resist or avoid stress because asexual spores are more dispersive and equally resistant [12, 13].