We studied CD8 T cell responses against HIV-1, cytomegalovirus, Epstein-Barr virus, and influenza in 128 subjects and demonstrate that polyfunctional CD8 T cell responses, also including IL-2 production and Ag-specific proliferation, are predominantly driven by virus epitopes restricted by HLA-B alleles. Interestingly, these protective CD8 T cells are equipped with low-avidity T cell receptors (TCRs) for the cognate virus epitope. Conversely, HLA-A-restricted epitopes are mostly associated with "only effector" IFN-gamma-secreting, with cytotoxicity, and with the lack of IL-2 production and Ag-specific proliferation. These CD8 T cells are equipped with high-avidity TCR and express higher levels of the T cell exhaustion marker PD-1. Thus, the functional profile of the CD8 T cell response is strongly influenced by the extent to which there is stimulation of polyfunctional (predominantly restricted by HLA-B) versus only effector (restricted by HLA-A) T cell responses. These results provide the rationale for the observed protective role of HLA-B in HIV-1-infection and new insights into the relationship between TCR avidity, PD-1 expression, and the functional profile of CD8 T cells.