Tumour-derived prostaglandin E2, signaling through its receptors EP2 and EP4, is shown to restrain the responses of tumour-infiltrating stem-like TCF1+CD8+ T lymphocytes, and modulation of T cell EP2 and EP4 can restore anticancer immunity. This evidence concerns the gene PTGER4 and neoplasm.