How gene duplication and divergence contribute to genetic novelty and adaptation has been of intense interest, but experimental evidence has been limited. The genetic switch controlling the yeast galactose use pathway includes two paralogous genes in Saccharomyces cerevisiae that encode a co-inducer (GAL3) and a galactokinase (GAL1). These paralogues arose from a single bifunctional ancestral gene as is still present in Kluyveromyces lactis. To determine which evolutionary processes shaped the evolution of the two paralogues, here we assess the effects of precise replacement of coding and non-coding sequences on organismal fitness. We suggest that duplication of the ancestral bifunctional gene allowed for the resolution of an adaptive conflict between the transcriptional regulation of the two gene functions. After duplication, previously disfavoured binding site configurations evolved that divided the regulation of the ancestral gene into two specialized genes, one of which ultimately became one of the most tightly regulated genes in the genome.