The immune system can suppress tumour development both by eliminating malignant cells and by preventing the outgrowth and spread of cancer cells that resist eradication1. Clinical and experimental data suggest that the latter mode of control-termed cancer-immune equilibrium1-can be maintained for prolonged periods of time, possibly up to several decades2-4. Although cancers most frequently originate in epithelial layers, the nature and spatiotemporal dynamics of immune responses that maintain cancer-immune equilibrium in these tissue compartments remain unclear. Here, using a mouse model of transplantable cutaneous melanoma5, we show that tissue-resident memory CD8+ T cells (TRM cells) promote a durable melanoma-immune equilibrium that is confined to the epidermal layer of the skin. A proportion of mice (~40%) transplanted with melanoma cells remained free of macroscopic skin lesions long after epicutaneous inoculation, and generation of tumour-specific epidermal CD69+ CD103+ TRM cells correlated with this spontaneous disease control. By contrast, mice deficient in TRM formation were more susceptible to tumour development. Despite being tumour-free at the macroscopic level, mice frequently harboured melanoma cells in the epidermal layer of the skin long after inoculation, and intravital imaging revealed that these cells were dynamically surveyed by TRM cells. Consistent with their role in melanoma surveillance, tumour-specific TRM cells that were generated before melanoma inoculation conferred profound protection from tumour development independently of recirculating T cells. Finally, depletion of TRM cells triggered tumour outgrowth in a proportion (~20%) of mice with occult melanomas, demonstrating that TRM cells can actively suppress cancer progression. Our results show that TRM cells have a fundamental role in the surveillance of subclinical melanomas in the skin by maintaining cancer-immune equilibrium. As such, they provide strong impetus for exploring these cells as targets of future anticancer immunotherapies.