In heterothallic basidiomycete fungi, sexual compatibility is restricted by mating types, typically controlled by two loci: PR, encoding pheromone precursors and pheromone receptors, and HD, encoding two types of homeodomain transcription factors. We analysed the single mating-type locus of the commercial button mushroom variety, Agaricus bisporus var. bisporus, and of the related variety burnettii. We identified the location of the mating-type locus using genetic map and genome information, corresponding to the HD locus, the PR locus having lost its mating-type role. We found the mip1 and β-fg genes flanking the HD genes as in several Agaricomycetes, two copies of the β-fg gene, an additional HD2 copy in the reference genome of A. bisporus var. bisporus and an additional HD1 copy in the reference genome of A. bisporus var. burnettii. We detected a 140 kb-long inversion between mating types in an A. bisporus var. burnettii heterokaryon, trapping the HD genes, the mip1 gene and fragments of additional genes. The two varieties had islands of transposable elements at the mating-type locus, spanning 35 kb in the A. bisporus var. burnettii reference genome. Linkage analyses showed a region with low recombination in the mating-type locus region in the A. bisporus var. burnettii variety. We found high differentiation between β-fg alleles in both varieties, indicating an ancient event of recombination suppression, followed more recently by a suppression of recombination at the mip1 gene through the inversion in A. bisporus var. burnettii and a suppression of recombination across whole chromosomes in A. bisporus var. bisporus, constituting stepwise recombination suppression as in many other mating-type chromosomes and sex chromosomes.