Carriers of certain human leukocyte antigen class I alleles show favorable prognosis of human immunodeficiency virus type 1 (HIV-1) infection, presumably due to effective CD8+ cytotoxic T-lymphocyte responses, but close relationships between class I variants mediating such responses to natural and to vaccine HIV-1 antigen have not been established. During 6 to 30 months of administration and follow-up in trials of ALVAC-HIV recombinant canarypox vaccines, cells from 42% of 291 HIV-1-negative vaccinated subjects typed at class I loci responded to an HIV-1 protein in a lytic bulk CD8+ cytotoxic T-lymphocyte assay. By 2 weeks after the second dose, higher proportions of vaccinees carrying one of two alleles consistently associated with slower progression of natural HIV-1 infection reacted at least once: B*27 carriers reacted to Gag (64%; odds ratio [OR] = 10.3, P = 0.001) and Env (36%; OR = 4.6, P = 0.04), and B*57 carriers reacted to Env (44%; OR = 6.6, P < 0.05). By 2 weeks after the third or fourth dose, B*27 carriers had responded (two or more reactions) to Gag (33%; OR = 4.4, P < 0.05) and B*57 carriers had responded to both Gag (39%; OR = 5.3, P = 0.013) and Env (39%; OR = 9.5, P = 0.002). Homozygosity at class I loci, although conferring an unfavorable prognosis following natural infection, showed no such disadvantage for vaccine response. Individual class I alleles have not previously demonstrated such clear and consistent relationship with both the clinical course of an infection and cellular immunity to a vaccine against the infectious agent. This proof of principle that class I an alleles modulate both processes has implications for development of HIV-1 and presumably other vaccines.