To gain insight into the rules that govern the binding of endogenous and viral peptides to a given major histocompatibility complex (MHC) class I molecule, we characterized the amino acid sequences of a set of self peptides bound by a soluble analogue of murine H-2Ld, H-2Lds. We tested corresponding synthetic peptides quantitatively for binding in several different assays, and built three-dimensional computer models of eight peptide/H-2Lds complexes, based on the crystallographic structure of the human HLA-B27/peptide complex. Comparison of primary and tertiary structures of bound self and antigenic peptides revealed that residues 2 and 9 were not only restricted in sequence and tolerant of conservative substitutions, but were spatially constrained in the three-dimensional models. The degree of sequence variability of specific residues in MHC-restricted peptides reflected the lack of structural constraint on those amino acids. Thus, amino acid residues that define a peptide motif represent side chains required or preferred for a close fit with the MHC class I heavy chain.