Several species of the genus Candida decode the standard leucine CUG codon as serine. This and other deviations from the standard genetic code in both nuclear and mitochondrial genomes invalidate the notion that the genetic code is frozen and universal and prompt the questions 'why alternative genetic codes evolved and, more importantly, how can an organism survive a genetic code change?' To address these two questions, we have attempted to reconstruct the early stages of Candida albicans CUG reassignment in the closely related yeast Saccharomyces cerevisiae. These studies suggest that this genetic code change was driven by selection using a molecular mechanism that requires CUG ambiguity. Such codon ambiguity induced a significant decrease in fitness, indicating that CUG reassignment can only be selected if it introduces an evolutionary edge to counteract the negative impact of ambiguity. We have shown that CUG ambiguity induces the expression of a novel set of stress proteins and triggers the general stress response, which, in turn, creates a competitive edge under stress conditions. In addition, CUG ambiguity in S. cerevisiae induces the expression of a number of novel phenotypes that mimic the natural resistance to stress characteristic of C. albicans. The identification of an evolutionary advantage created by CUG ambiguity is the first experimental evidence for a genetic code change driven by selection and suggests a novel role for codon reassignment in the adaptation to new ecological niches.