The phenotypic effect of an allele at one genetic site may depend on alleles at other sites, a phenomenon known as epistasis. Epistasis can profoundly influence the process of evolution in populations and shape the patterns of protein divergence across species. Whereas epistasis between adaptive substitutions has been studied extensively, relatively little is known about epistasis under purifying selection. Here we use computational models of thermodynamic stability in a ligand-binding protein to explore the structure of epistasis in simulations of protein sequence evolution. Even though the predicted effects on stability of random mutations are almost completely additive, the mutations that fix under purifying selection are enriched for epistasis. In particular, the mutations that fix are contingent on previous substitutions: Although nearly neutral at their time of fixation, these mutations would be deleterious in the absence of preceding substitutions. Conversely, substitutions under purifying selection are subsequently entrenched by epistasis with later substitutions: They become increasingly deleterious to revert over time. Our results imply that, even under purifying selection, protein sequence evolution is often contingent on history and so it cannot be predicted by the phenotypic effects of mutations assayed in the ancestral background.intragenic epistasis | coevolution | near neutrality | protein stability W hether a heritable mutation is advantageous or deleterious to an organism often depends on the evolutionary history of the population. A mutation that is beneficial at the time of its introduction may confer its beneficial effect only in the presence of other potentiating or permissive mutations (1-9). Thus, the fate of a mutation arising in a population may be contingent on previous mutations (10-13). Conversely, once a mutation has fixed in a population, the mutation becomes part of the genetic background onto which subsequent modifications are introduced. Because the beneficial effects of the subsequent modifications may depend on the focal mutation, as time passes reversion of the focal mutation may become increasingly deleterious, leading to a type of evolutionary conservatism, or entrenchment (14-18).In the context of protein evolution, the effects of contingency and entrenchment are most easily studied by considering a sequence of single amino acid changes (19) that extends both forward and backward in time from some focal substitution. To assess the roles of contingency and entrenchment we can study the degree to which each focal substitution was facilitated by previous substitutions, and the degree to which the focal substitution influences the subsequent course of evolution (Fig. 1A).Dependencies within a sequence of substitutions are closely connected to the concept of epistasis-that is, the idea that the phenotypic effect of a mutation at a particular genetic site may depend on the genetic background in which it arises (20-24). In the absence of epistasis, a mutation has the same effect ...