Arrhenotoky is the favored reproductive mode used by Hymenoptera though thelytoky, the production of females by virgin females, is observed in some taxa.Diplolepis rosaeis a gall wasp producing bedeguars when parasitizing wild dog roses and reproduces mainly by thelytoky. In this study, we assess the effect of facultative thelytoky on the genetic structure, the genomic structure of polymorphism, and the efficacy of recombination inD. rosae. We assembled a high-quality reference genome using Oxford Nanopore long-read technology and sequenced 17 samples collected in France with high-coverage Illumina reads. We found twoD. rosaeperipatric populations that split recently and diverged quickly probably due toWolbachia-induced thelytoky. However, we demonstrated a switch from thelytoky to arrhenotoky in both populations. One population ('arrhenotokous') shows a 6.7 times higher recombination rate and localized runs of homozygosity (ROHs) compared with the other population ('thelytokous') showing widespread ROHs. We showed that genes involved in male traits in the 'arrhenotokous' population are under negative selection while under balancing or relaxed selection in the 'thelytokous' population. Thus, althoughD. rosaefavors thelytoky, strong selection acts on maintaining male function and provides a striking example of the advantage of recombination in natural populations.