The maintenance of sexual reproduction is a problem in evolutionary theory because, all else being equal, asexual populations have a twofold fitness advantage over their sexual counterparts and should rapidly outnumber a sexual population because every individual has the potential to reproduce. The twofold cost of sex exists because of anisogamy or gamete dimorphism-egg-producing females make a larger contribution to the zygote compared with the small contribution made by the sperm of males, but both males and females contribute 50% of the genes. Anisogamy also generates the conditions for sexual selection, a powerful evolutionary force that does not exist in asexual populations. The continued prevalence of sexual reproduction indicates that the 'all else being equal' assumption is incorrect. Here I show that sexual selection can mitigate or even eliminate the cost of sex. If sexual selection causes deleterious mutations to be more deleterious in males than females, then deleterious mutations are maintained at lower equilibrium frequency in sexual populations relative to asexual populations. The fitness of sexual females is higher than asexuals because there is no difference in the fecundity of sexual females and asexuals of the same genotype, but the equilibrium frequency of deleterious mutations is lower in sexual populations. The results are not altered by synergistic epistasis in males.