Background Tertiary lymphoid structures (TLSs) are key immune niches involved in antitumor immunity. However, their functional impact depends on spatial localization, maturation status, and cellular composition within the tumor immune microenvironment (TIME). Despite the recognized role of Helicobacter pylori ( H. pylori ) in gastric carcinogenesis and immune modulation, its influence on TLS architecture and function in gastric cancer remains poorly understood. Methods We integrated public single-cell RNA sequencing (scRNA-seq; HRA000704, GSE150290, and GSE249874; n=36), spatial transcriptomics (ST; GSE251950; n=9), and multiplex immunofluorescence (mIF) staining (n=90) to comprehensively profile TLSs across H. pylori strata. Subsequently, Kaplan–Meier (KM) analysis, restricted cubic spline (RCS) analysis, receiver operating characteristic (ROC) analysis, and concordance index (C-index) assessment were employed to determine the predictive value of distinct TLS-related features on clinical outcomes. Results H. pylori -positive GC showed preferential peritumoral TLS localization and reduced TLS maturation. Within TLSs, H. pylori -positive tumors showed accumulation of HSP70 + B cells and reduced representation of ZNF683 + CD8 + T cells. This compositional shift was associated with disrupted CD21 + follicular dendritic cell (FDC) networks and CD23 + germinal center-like structures. Based on these reciprocal intra-TLS immune patterns, two TLS compositional states were defined. TLS type 1, marked by HSP70 + B-cell enrichment and ZNF683 + CD8 + T-cell reduction, was enriched in H. pylori -positive tumors, whereas TLS type 2 showed the opposite pattern and was associated with favorable overall survival (OS). Incorporating TLS composition into the conventional clinicopathological model increased the 5-year area under the ROC curve (AUC) from 0.847 to 0.910. Conclusions Our study identifies an H. pylori -associated TLS compositional state characterized by HSP70 + B-cell enrichment and reduced ZNF683 + CD8 + T-cell representation. Incorporating TLS composition into clinicopathological models provided incremental prognostic information in gastric cancer.

