The a mating type locus of the phytopathogenic fungus U. maydis controls fusion of haploid cells and filamentous growth of the dikaryotic mycelium. The a locus exists in two alleles, termed a1 and a2, which are defined by nonhomologous DNA regions comprising 4.5 kb for a1 and 8 kb for a2, flanked by identical sequences. Based on functional assays, mutants, and sequencing, we demonstrate that the mating type in each allele is determined by a set of two genes. One encodes a precursor for a lipopeptide mating factor, and the other specifies the receptor for the pheromone secreted by cells of opposite mating type. Thus, U. maydis employs a novel strategy to determine its mating type by providing the primary determinants of cell-cell recognition directly from the mating type locus.