Class I major histocompatibility complex (MHC) molecules interact with self and foreign peptides of diverse amino acid sequences yet exhibit distinct allele-specific selectivity for peptide binding. The structures of the peptide-binding specificity pockets (subsites) in the groove of murine H-2Kb as well as human histocompatibility antigen class I molecules have been analyzed. Deep but highly conserved pockets at each end of the groove bind the amino and carboxyl termini of peptide through extensive hydrogen bonding and, hence, dictate the orientation of peptide binding. A deep polymorphic pocket in the middle of the groove provides the chemical and structural complementarity for one of the peptide's anchor residues, thereby playing a major role in allele-specific peptide binding. Although one or two shallow pockets in the groove may also interact with specific peptide side chains, their role in the selection of peptide is minor. Thus, usage of a limited number of both deep and shallow pockets in multiple combinations appears to allow the binding of a broad range of peptides. This binding occurs with high affinity, primarily because of extensive interactions with the peptide backbone and the conserved hydrogen bonding network at both termini of the peptide. Interactions between the anchor residue (or residues) and the corresponding allele-specific pocket provide sufficient extra binding affinity not only to enhance specificity but also to endure the presentation of the peptide at the cell surface for recognition by T cells.