Celiac disease is associated with HLA-DQ2 and, to a lesser extent, HLA-DQ8. Type 1 diabetes is associated with the same DQ molecules in the opposite order and with possible involvement of trans-encoded DQ heterodimers. T cells that are reactive with gluten peptides deamidated by transglutaminase 2 and invariably restricted by DQ2 or DQ8 can be isolated from celiac lesions. We used intestinal T cells from celiac patients to map DQ2 and DQ8 epitopes within 2 representative gluten proteins, alpha-gliadin AJ133612 and gamma-gliadin M36999. For alpha-gliadin, DQ2- and DQ8-restricted T cells recognized deamidated peptides of 2 separate regions. For gamma-gliadin, DQ2- and DQ8-restricted T cells recognized deamidated peptides of the same region. Some gamma-gliadin peptides were recognized by T cells in the context of DQ2 or DQ8 when bound in exactly the same registers, but with different requirements for deamidation; deamidation at peptide position 4 (P4) was important for DQ2-restricted T cells, whereas deamidation at P1 and/or P9 was important for DQ8-restricted T cells. Peptides combining the DQ2 and DQ8 signatures could be presented by DQ2, DQ8, and trans-encoded DQ heterodimers. Our findings shed light on the basis for the HLA associations in celiac disease and type 1 diabetes.