A general, combinatorial library method for the rapid identification of high-affinity peptide ligands of protein modular domains is reported. The validity of this method has been demonstrated by determining the sequence specificity of four Src homology 2 (SH2) domains derived from protein tyrosine phosphatase SHP-1 and SHP-2 and inositol phosphatase SHIP. A phosphotyrosyl (pY) peptide library was screened against the SH2 domains, and the beads that carry high-affinity ligands of the SH2 domains were identified and peptides were sequenced by partial Edman degradation and mass spectrometry. The results reveal that the N-terminal SH2 domain of SHP-2 is capable of recognizing four different classes of pY peptides. Binding competition studies suggest that the four classes of pY peptides all bind to the same site on the SH2 domain surface. The C-terminal SH2 domains of SHP-1 and SHP-2 and the SHIP SH2 domain each bind to pY peptides of a single consensus sequence. Database searches using the consensus sequences identified most of the known as well as many potential interacting proteins of SHP-1 and/or SHP-2. Several proteins are found to bind to the SH2 domains of SHP-1 and SHP-2 through a new, nonclassical ITIM motif, (V/I/L)XpY(M/L/F)XP, which corresponds to the class IV peptides selected from the pY library. The combinatorial library method should be generally applicable to other protein domains.