Evolution has resulted in numerous innovations that allow organisms to increase their fitness by choosing particular mating partners, including secondary sexual characteristics, behavioural patterns, chemical attractants and corresponding sensory mechanisms. The haploid yeast Saccharomyces cerevisiae selects mating partners by interpreting the concentration gradient of pheromone secreted by potential mates through a network of mitogen-activated protein kinase (MAPK) signalling proteins. The mating decision in yeast is an all-or-none, or switch-like, response that allows cells to filter weak pheromone signals, thus avoiding inappropriate commitment to mating by responding only at or above critical concentrations when a mate is sufficiently close. The molecular mechanisms that govern the switch-like mating decision are poorly understood. Here we show that the switching mechanism arises from competition between the MAPK Fus3 and a phosphatase Ptc1 for control of the phosphorylation state of four sites on the scaffold protein Ste5. This competition results in a switch-like dissociation of Fus3 from Ste5 that is necessary to generate the switch-like mating response. Thus, the decision to mate is made at an early stage in the pheromone pathway and occurs rapidly, perhaps to prevent the loss of the potential mate to competitors. We argue that the architecture of the Fus3-Ste5-Ptc1 circuit generates a novel ultrasensitivity mechanism, which is robust to variations in the concentrations of these proteins. This robustness helps assure that mating can occur despite stochastic or genetic variation between individuals. The role of Ste5 as a direct modulator of a cell-fate decision expands the functional repertoire of scaffold proteins beyond providing specificity and efficiency of information processing. Similar mechanisms may govern cellular decisions in higher organisms and be disrupted in cancer.