Yeast mating type is determined by the genotype at the mating type locus (MAT). In homothallic (self-fertile) Saccharomycotina such as Saccharomyces cerevisiae and Kluveromyces lactis, high-efficiency switching between a and α mating types enables mating. Two silent mating type cassettes, in addition to an active MAT locus, are essential components of the mating type switching mechanism. In this study, we investigated the structure and functions of mating type genes in H. polymorpha (also designated as Ogataea polymorpha). The H. polymorpha genome was found to harbor two MAT loci, MAT1 and MAT2, that are ∼18 kb apart on the same chromosome. MAT1-encoded α1 specifies α cell identity, whereas none of the mating type genes were required for a identity and mating. MAT1-encoded α2 and MAT2-encoded a1 were, however, essential for meiosis. When present in the location next to SLA2 and SUI1 genes, MAT1 or MAT2 was transcriptionally active, while the other was repressed. An inversion of the MAT intervening region was induced by nutrient limitation, resulting in the swapping of the chromosomal locations of two MAT loci, and hence switching of mating type identity. Inversion-deficient mutants exhibited severe defects only in mating with each other, suggesting that this inversion is the mechanism of mating type switching and homothallism. This chromosomal inversion-based mechanism represents a novel form of mating type switching that requires only two MAT loci.