Here we identified an IL-21-producing gastric CD4+T cell subset, which exhibited tissue-resident CXCR5−BTLA−PD-1hi TFH-like phenotype in H. pylori-positive gastritis patients. Here, IL21 is linked to gastritis.