Changes in gene regulatory networks are a major source of evolutionary novelty. Here we describe a specific type of network rewiring event, one that intercalates a new level of transcriptional control into an ancient circuit. We deduce that, over evolutionary time, the direct ancestral connections between a regulator and its target genes were broken and replaced by indirect connections, preserving the overall logic of the ancestral circuit but producing a new behaviour. The example was uncovered through a series of experiments in three ascomycete yeasts: the bakers' yeast Saccharomyces cerevisiae, the dairy yeast Kluyveromyces lactis and the human pathogen Candida albicans. All three species have three cell types: two mating-competent cell forms (a and α) and the product of their mating (a/α), which is mating-incompetent. In the ancestral mating circuit, two homeodomain proteins, Mata1 and Matα2, form a heterodimer that directly represses four genes that are expressed only in a and α cells and are required for mating. In a relatively recent ancestor of K. lactis, a reorganization occurred. The Mata1-Matα2 heterodimer represses the same four genes (known as the core haploid-specific genes) but now does so indirectly through an intermediate regulatory protein, Rme1. The overall logic of the ancestral circuit is preserved (haploid-specific genes ON in a and α cells and OFF in a/α cells), but a new phenotype was produced by the rewiring: unlike S. cerevisiae and C. albicans, K. lactis integrates nutritional signals, by means of Rme1, into the decision of whether or not to mate.