Most explanations for the evolutionary maintenance of sex depend on the assumption that sex produces variation by recombining parental haplotypes in the offspring. Therefore meiosis is expected to be useful only in heterozygotes. We tested this assumption by competing sexual strains of yeast against constitutive asexuals in a hot (37°C) culture for 500 generations, in either heterozygous or homozygous genetic backgrounds. We found that there was an initial cost of sex for all the sexual strains, which was indicated by a sharp increase in the proportion of asexuals after the induction of sex. The cost was larger in the heterozygotes than in the homozygotes, probably because of recombinational load. However, in two of the three heterozygote backgrounds, after the initial success of the asexuals, the remaining sexuals eventually drove them out of the population. These two heterozygotes also suffered the largest initial cost of sex. In the other heterozygote and in the three homozygote backgrounds it appeared to be a matter of chance whether sexuals or asexuals won. The average relative fitness increased in all the strains, but the increase was largest in the two strains that showed both the clearest advantage and the largest cost of sex. We conclude that these results are consistent with the traditional view that sex has a short–term cost but a long–term benefit.