T cells generally recognize peptide antigens bound to MHC proteins through contacts with residues found within or immediately flanking the seven- to nine-residue sequence accommodated in the MHC peptide-binding groove. However, some T cells require peptide residues outside this region for activation, the structural basis for which is unknown. Here, we have investigated a HIV Gag-specific T cell clone that requires an unusually long peptide antigen for activation. The crystal structure of a minimally antigenic 16-mer bound to HLA-DR1 shows that the peptide C-terminal region bends sharply into a hairpin turn as it exits the binding site, orienting peptide residues outside the MHC-binding region in position to interact with a T cell receptor. Peptide truncation and substitution studies show that both the hairpin turn and the extreme C-terminal residues are required for T cell activation. These results demonstrate a previously unrecognized mode of MHC-peptide-T cell receptor interaction.