Main

Most cancers arise within epithelial layers, meaning that immune-cell access to these tissue compartments—including the epidermal layer of the skin—is critical to effective anticancer immunity, particularly at early stages of carcinogenesis. Whereas recirculating T cells (TCIRC cells) are largely excluded from the epidermis in the absence of inflammation6,7, a distinct population of sessile CD8+ CD69+ CD103+ TRM cells populates this anatomical compartment following infection or inflammation6,7,8,9. Given the important role of TRM cells in local and regional immune surveillance6,7,8,9,10,11, we reasoned that they could afford immunity against epidermis-derived skin cancers such as melanoma. This notion is supported by recent reports indicating a protective function of skin TRM cells against intradermally or subcutaneously transplanted tumours11,12,13,14. However, immunity against epithelial cancers was not addressed in earlier studies and it remained unclear whether TRM cells could achieve complete elimination, or whether they mediated long-term suppression of persisting tumour cells.

To investigate these issues, we used a transplantable model of skin-contained tumour development that involves targeting B16 melanoma cells to the outermost layers of mouse skin5. We also generated B16 cell variants (B16.gB cells) that express glycoprotein B (gB) from herpes simplex virus (HSV), which allowed us to track transgenic gB-specific CD8+ T cells (gBT-I cells) responding to melanoma. Contrasting with the rapid tumour development in all mice that follows subcutaneous inoculation of B16.gB cells, epicutaneous transfer to C57BL/6 wild-type mice resulted in delayed tumour formation, with variable growth kinetics and reduced penetrance. In around 60% of mice, epicutaneous inoculation induced tumours that became visible at 2–4 weeks after inoculation, although some developed as late as 6–14 weeks after inoculation (Fig. 1a–c and Extended Data Fig. 1a, b). While most tumours grew progressively, often coinciding with the establishment of metastasis in lymph nodes, others remained small and did not progress for several weeks (Fig. 1c and Extended Data Fig. 1b, c). However, around 40% of mice did not develop melanomas within 4 weeks after inoculation, and were designated ‘non-developers’ if they remained free of macroscopic tumours thereafter (Fig. 1a–c). Spontaneous protection was immune mediated, as mice with genetic defects in various innate and/or adaptive lymphocyte populations—including Il15–/–, Rag2–/–;Il2rg–/– and Rag1–/– mice—were highly susceptible to melanoma challenge (Fig. 1d–f).

Fig. 1: Immune-mediated tumour suppression can result in persistent melanoma.
figure 1

a, b, Proportion of tumour-free (non-developer) and tumour-bearing (melanoma) wild-type mice following epicutaneous (e.c.) or subcutaneous (s.c.) inoculation with B16.gB or B16.gB.Luc cells (pooled analysis). c, Disease outcomes 30 days after epicutaneous inoculation. Dotted lines indicate spleen position. Data pooled from n = 3 (s.c.) and n = 17 (e.c.) biologically independent experiments with a total of n = 15 (s.c.) and n = 152 (e.c.) mice (a), or pooled from (b) or representative of (c) n = 3 (s.c.) and n = 46 (e.c.) biologically independent experiments with a total of n = 15 (s.c.) and n = 452 (e.c.) mice. df, Proportion of tumour-free Il15–/– (d), Rag2–/–;Il2rg–/– (e) and Rag1–/– (f) mice versus wild-type (WT) mice after e.c. B16.gB inoculation. Data pooled from n = 2 biologically independent experiments with n = 20 (d), n = 20 (Rag2–/–;Il2rg–/–) or n = 21 (WT) (e), or n = 16 (f) mice per group. ***P = 0.0002 (d) or P = 0.0008 (f), ****P < 0.0001 (e), log-rank Mantel–Cox test. h, Detection frequency of gB or Luc gDNA by ddPCR in macroscopic melanoma (n = 11), non-developer skin (n = 28) or naive skin (negative control; n = 8) more than 4 weeks after inoculation with B16.gB.Luc cells. Data pooled from n = 3 biologically independent experiments. hk, B6 albino mice were inoculated epicutaneously with B16.gB.Luc cells. h, i, Bioluminescence signals detected using an intravital imaging system (IVIS) platform (arrows; different days (d) post-inoculation) in progressing melanoma (h) or non-developer skin (i). j, Miniscule melanoma on mouse in panel i). k, Proportion of non-developer mice with recurring bioluminescence signals. (IVIS+ is defined as signal detection in three separate imaging sessions later than 4 weeks post-inoculation.) Data pooled from n = 2 biologically independent experiments incorporating n = 13 non-developers imaged longitudinally for more than five months. ln, Two-photon microscopy images of B16.Tyr–/–.mCherry cells (red, arrows) in the skin of B6 albino mice with macroscopic melanoma (l, 2 weeks post-inoculation) or in non-developer skin (m, n; 4 or more weeks post-inoculation). The blue colour shows the second harmonic generation signal (SHG). Note the autofluorescent hair (red, asterisks). Data representative of n = 3 biologically independent experiments with n = 22 mice.

Source data

Given that some tumours developed late (Extended Data Fig. 1b), we reasoned that a proportion of non-developers harboured microscopic melanomas long after inoculation. In line with this, we detected B16-derived genomic DNA (gDNA) by droplet digital polymerase chain reaction (ddPCR) in 45 ± 10% of skin samples from non-developers after inoculation with B16.gB.Luc cells, which co-express gB and luciferase (Fig. 1g). In a separate approach, we epicutaneously inoculated B6(Cg)–Tyrc–2J (B6 albino) mice with B16.gB.Luc cells for longitudinal bioluminescence imaging. Macroscopic melanomas emitted strong signals upon luciferin injection, whereas in other mice signals were recorded early after inoculation but then became undetectable over time (Fig. 1h and Extended Data Fig. 1d). Of note, repeated imaging over more than 5 months revealed recurring signals in previously inoculated skin in 9 out of 13 non-developer mice (Fig. 1i–k and Extended Data Fig. 1d).

To refine the detection of occult melanomas in non-developer mice, we inoculated B6 albino mice with melanin-pigment-deficient, mCherry-expressing B16.Tyr–/–.mCherry cells. Subsequent analysis by two-photon microscopy revealed a single-cell-resolution view of melanomas developing in the skin (Fig. 1l and Extended Data Fig. 1e). Notably, two-photon microscopy confirmed the persistence of B16 cells or small clusters in the epidermis of some non-developers (Fig. 1m, n and Extended Data Fig. 1f). Combined, these results suggest that, despite effective immune-mediated tumour suppression, a proportion of disease-free mice failed to achieve complete melanoma eradication from the skin and instead harboured occult B16 cells for long periods of time.

Next we examined the responses of melanoma-specific CD8+ T cells by tracking congenically marked gBT-I.CD45.1 cells transferred before B16.gB inoculation. Expansion and activation of gBT-I.CD45.1 cells was observed in the skin-draining lymph nodes 7 days after inoculation, and these cells had distributed to spleen and tumour-challenged skin by 2 weeks after inoculation (Extended Data Fig. 2a–g). gBT-I.CD45.1 cells accumulated both within tumours and in peritumoural skin, as well as in the skin of tumour-free non-developer mice (Fig. 2a–d). gBT-I.CD45.1 cells that infiltrated melanomas had a mixed CD69+/− phenotype and were CD103, whereas most gBT-I.CD45.1 cells in peritumoural skin were CD69+ and CD103+ (Fig. 2a and Extended Data Fig. 2h). Of note, most mice that remained tumour-free 2–4 weeks after inoculation generated CD69+ CD103+ gBT-I TRM cells in the skin, and such responses were observed more frequently and at higher densities than in the skin of tumour-bearing mice (Fig. 2c, d). TRM formation was not dependent on local antigen recognition: OT-I CD8+ T cells with unrelated specificity and activated by concurrent skin infection with HSV–ovalbumin showed similar upregulation of CD69 and CD103 in peritumoural skin (Extended Data Fig. 3a–d).

Fig. 2: Generation of melanoma-specific TRM cells in skin.
figure 2

a–d, WT mice received naive gBT-I.CD45.1 cells before e.c. inoculation with B16.gB. Shown are the phenotype (a) and numbers (b, c) of gBT-I.CD45.1 cells infiltrating tumours, peritumoural skin and non-developer skin more than 3 weeks post-inoculation. d, Proportion of mice possessing more than 10 gBT-I.CD45.1 TRM cells (TRM cells +) per cm2 of peritumoural skin (maroon) or tumour-free skin (orange). Data are representative of (a) or pooled from (bd) n = 7 biologically independent experiments with n = 50 (b) or n = 52 (‘Melanoma’) and n = 33 (‘Non-developer’) mice (c). **P = 0.0012, Mann–Whitney test (c). e, WT mice received naive gBT-I.uGFP cells before e.c. inoculation with B16.gB.mCherry cells. Two-photon microscopy analysis of the inoculation site (left panel) and remote (right panel) skin in non-developer mice. gBT-I.uGFP cells are in green and SHG in blue. Note autofluorescent hairs (red/orange). Images are representative of n = 2 biologically independent experiments with n = 4 mice. f, Multiplex immunofluorescence microscopy of human lymph-node (upper panel, n = 68) and cutaneous (lower panel, n = 3) melanoma metastases. Arrows indicate examples of CD103+ CD8+ T cells at tumour margins. CD8, green; CD103, pink; SOX10 (melanoma), orange; DAPI, blue. g, h, Proportion of non-developers amongst Cd69–/– (g), Itgae–/– (h) and WT mice following e.c. B16.gB inoculation. Data pooled from n = 3 (g) or n = 4 (h) biologically independent experiments with n = 44 mice per group (h) or n = 28 (WT) or n = 24 (Cd69–/–) mice (g). **P = 0.0029 (g), 0.0070 (h), log-rank Mantel–Cox test.

Source data

We confirmed the accumulation of epidermal TRM cells in non-developer skin by using intravital two-photon microscopy to track gBT-I cells expressing green fluorescent protein (gBT-I.uGFP) in B16.gB-challenged B6 albino mice (Fig. 2e). Consistent with previous reports14,15,16,17, CD103+ CD8+ T cells were also readily detected in human metastatic melanoma and were frequently concentrated at the margins of tumour nodules (Fig. 2f), reminiscent of their peritumoural localization in mouse skin (Fig. 2a). Increased accumulation of tumour-associated CD103+ CD8+ T cells was recently shown to correlate with improved survival in patients with metastatic melanoma17. Thus, to test whether efficient generation of TRM cells was required for melanoma control, we inoculated Cd69–/– (CD69-deficient) and Itgae–/– (CD103-deficient) mice, which are known to be impaired in the formation and persistence, respectively, of skin TRM cells18. Both Cd69–/– and Itgae–/– mice were more susceptible to melanoma formation than were wild-type mice (Fig. 2g, h). The strong defect in melanoma control in Cd69–/– mice could be rescued by transfer of naive wild-type gBT-I cells but not gBT-I.Cd69–/– cells before challenge with B16.gB cells (Extended Data Fig. 4), implying that lack of CD69 expression by CD8+ T cells and, consequently, impaired TRM formation18 led to the inability of Cd69–/– mice to suppress tumour development. Thus, the accumulation of TRM cells in skin corresponded with melanoma control, whereas impaired TRM formation was associated with increased susceptibility. Further supporting the importance of CD8+ T cells to tumour control, B16.gB cells from small non-progressing melanomas expressed higher levels of major histocompatibility complex I (MHC I) proteins than those in rapidly progressing melanomas (Extended Data Fig. 5).

We predicted that melanoma control required interactions between gBT-I and B16.gB cells. Therefore, we imaged B6 albino mice by intravital two-photon microscopy to track the responses of gBT-I.uGFP cells to inoculation with gB-expressing B16.gB.Tyr–/–.mCherry cells in developer and non-developer mice. We observed varying degrees of gBT-I.uGFP infiltration in or around developing melanomas (Fig. 3a, Extended Data Fig. 6a and Supplementary Video 1). These gBT-I.uGFP cells displayed a spectrum of behaviours while interacting with B16.gB.Tyr–/–.mCherry cells, including prolonged arrest and probing activity, as well as rapid migration (Fig. 3a and Supplementary Video 1). In non-developer skin, most gBT-I cells were epidermal and displayed crawling behaviour and dendritic protrusions characteristic of TRM cells generated by skin infection6,9 (Fig. 3b, c, Extended Data Fig. 6b and Supplementary Videos 2, 3). Of note, gBT-I.uGFP TRM cells co-localized with epidermal B16.gB.Tyr–/–.mCherry cells that persisted in the absence of macroscopic tumours, and such contacts lasted up to 2 hours (Fig. 3b, c and Supplementary Videos 2, 3). These dynamic interactions were consistent with active immune surveillance and suggested that TRM cells were involved in tumour suppression.

Fig. 3: TRM cells dynamically survey B16 melanoma in skin.
figure 3

B6 albino mice received naive gBT-I.uGFP cells before e.c. inoculation with B16.gB.Tyr–/–.mCherry cells. Shown are two-photon microscopy images and time-lapse series (at the indicated minutes (′)) of gBT-I.uGFP cells interacting with B16.gB.Tyr–/–.mCherry cells in macroscopic melanoma more than 2 weeks post-inoculation (a) or in the skin of non-developers at more than 4 weeks post-inoculation. (b, c). Data are representative of n = 3 biologically independent experiments with n = 17 mice. B16.gB.Tyr–/–.mCherry cells (B16.gB; arrows) are in red; gBT-I.uGFP cells (gBT-I) are in green; SHG is in blue. Note the autofluorescent hair (green, asterisks).

Source data

To investigate the protective potential of melanoma-specific TRM cells, we generated gB-specific TCIRC and TRM cells by infecting the skin with HSV-1, as described6,8. When challenged with B16.gB cells more than 4 weeks later, HSV-immune mice were protected from tumour development (Fig. 4a), although B16-derived gDNA was detected in the skin of almost half of these mice (Extended Data Fig. 7). This protection was antigen specific: HSV-immunized mice failed to suppress tumours after challenge with B16.Ova cells (Fig. 4b). Next, we locally deposited in vitro activated gBT-I.CD45.1 cells by epicutaneous transfer, yielding CD103+ CD69+ TRM cells in the skin together with a small population of TCIRC cells that variably egressed from the skin (Extended Data Fig. 8a, b). These mice—but not those with control OT-I TRM cells—were protected from B16.gB challenge more than 4 weeks later (Fig. 4c).

Fig. 4: Melanoma-specific TRM cells promote cancer–immune equilibrium.
figure 4

a, WT mice were infected with HSV on flank skin and challenged with B16.gB cells at more than 4 weeks post-inoculation. The proportion of non-developers among HSV-immune and naive (control) mice is shown. Data pooled from n = 4 biologically independent experiments with n = 34 (control) or n = 30 (HSV immune) mice. ****P < 0.0001. b, The same set-up was used as in panel a, except that HSV-immune mice were challenged with either B16.gB or B16.Ova cells. Data pooled from n = 2 biologically independent experiments with n = 20 mice per group. ****P = 0.0001. c, WT mice were inoculated with e.c. activated gBT-I.CD45.1 (gBT-I) or OT-I.CD45.1 (OT-I) cells and challenged with B16.gB cells at the site of T-cell transfer more than 4 weeks later. Data pooled from n = 2 biologically independent experiments with n = 15 (OT-I) or n = 16 (gBT-I) mice. ***P = 0.0002. d, Experimental protocol. WT or Rag1–/– recipient mice (Thy1.2+) were transferred with e.c. activated gBT-I.Thy1.1 (Thy1.1+) cells (4 × 106) and treated with anti-Thy1.1 antibody more than 4 weeks later. Mice were challenged e.c. with B16.gB or B16.gB.Luc cells later than 1 week post-depletion. e, f, Proportion of non-developers among WT (e) and Rag1–/– (f) mice in anti-Thy1.1-treated (only TRM) or PBS-treated (TCIRC + TRM) mice compared with naive mice (control). Data pooled from n = 4 biologically independent experiments with n = 22 (only TRM and TCIRC + TRM) or n = 26 (control) mice (e), or n = 3 biologically independent experiments with n = 20 (only TRM), n = 10 (TCIRC + TRM) or n = 13 (control) mice (f). *P = 0.0381, **P = 0.0074 (e), 0.0018 (f), ****P < 0.0001. g, Experimental protocol. This is the same set-up as in panel d, except that non-developers after B16.gB challenge were further treated intradermally (i.d.) with high-dose anti-Thy1.1 antibody at more than 4 weeks post-inoculation to deplete TRM cells h, Proportion of mice remaining tumour-free after TRM depletion. Data pooled from n = 5 biologically independent experiments with n = 29 (TRM depletion) or n = 26 (control) mice. *P = 0.0286. i, Proportion of non-developers amongst Tnfa–/–and WT mice after e.c. B16.gB inoculation. Data pooled from n = 6 biologically independent experiments with n = 62 (Tnfa–/–) and n = 60 (WT) mice. **P = 0.0042. j, Tnfa–/– mice were transferred epicutaneously with gBT-I.WT or gBT-I.Tnfa–/– cells and challenged with B16.gB cells more than 4 weeks later. The proportion of tumour-free mice or mice with tumours that remained less than 0.1 mm3 in volume is shown. Data pooled from n = 2 biologically independent experiments with n = 9 (Tnfa–/–) or n = 10 (WT) mice. *P = 0.0205. All statistics by log-rank Mantel–Cox test.

To test whether TRM cells alone could afford protection, we repeated these experiments with Thy1.1-expressing gBT-I.Thy1.1 cells, which allowed us to selectively deplete TCIRC cells by intraperitoneal treatment with low-dose anti-Thy1.1 antibody, as described19 (Fig. 4d and Extended Data Fig. 8c, d). The majority of mice suppressed tumour development irrespective of TCIRC depletion, even in the absence of endogenous T cells in Rag1–/– mice, although protection was most pronounced in mice harbouring both TRM and TCIRC cells (Fig. 4e, f). Finally, we investigated the contribution of TRM cells to the control of persistent melanoma cells in non-developer skin. To this end, mice with gBT-I.Thy1.1 TRM cells were depleted of TCIRC cells and, more than 1 week later, were challenged with B16.gB cells. Non-developers were then depleted of TRM cells by intradermal treatment with high-dose anti-Thy1.1 antibody more than 4 weeks later (Fig. 4g and Extended Data Fig. 8e, f). TRM depletion triggered melanoma outgrowth in a proportion of previously tumour-free mice (5 out of 29), whereas no skin tumours developed in control mice (0 of 26) (Fig. 4h). The observation that tumour outgrowth was not evident in all mice is probably related to incomplete TRM depletion, protection by non-depleted endogenous TRM cells, and/or melanoma elimination in some mice before TRM depletion. Regardless, the combined results indicate that TRM cells can provide tumour surveillance by actively promoting melanoma–immune equilibrium.

To elucidate the potential mechanisms involved in melanoma control, we inoculated wild-type mice alongside mice deficient in the production of the effector molecules perforin, interferon-γ (IFN-γ) or tumour-necrosis factor-α (TNF-α). Perforin-deficient (Perf1–/–) and IFN-γ-deficient (Ifng–/–) mice had similar tumour incidences to wild-type controls (Extended Data Fig. 9a, b), whereas Tnfa–/– mice had higher incidences than wild-type controls (Fig. 4i). gBT-I TRM cells generated after melanoma challenge could produce IFN-γ and TNF-α upon antigen stimulation in situ, indicating that they were functional despite expression of immune-checkpoint receptors such as PD-1 (Extended Data Fig. 10a–e). Finally, we generated wild-type or Tnfa–/– gBT-I TRM cells in Tnfa–/– mice before B16.gB challenge, as in Fig. 4c. TNF-α-deficient gBT-I cells were less efficient at suppressing tumour outgrowth in Tnfa–/– mice than were wild-type gBT-I cells (Fig. 4j). These results are consistent with previous reports indicating that TNF-α is involved in long-term melanoma control20, and that TNF-α together with IFN-γ can drive cancer senescence21.

Combined, our results provide unequivocal evidence that effective tumour suppression can result in a dynamic melanoma–immune equilibrium in skin and that such lesions can remain clinically occult for prolonged periods of time, if not indefinitely. Although our findings echo clinical and experimental data describing cancer–immune equilibrium as an element of effective cancer surveillance1,2,3,4, this mode of immunity has remained inherently difficult to study at the cellular level. Critically, we identify TRM cells as important drivers of the equilibrium state, in line with previous reports linking the accumulation of these cells with enhanced anticancer immunity in patients17,22,23,24,25,26 and mouse models12,13,14,26. The densities of TRM cells that co-localize with persisting melanoma cells are probably below those required for effective target-cell killing27,28, providing one possible explanation as to why melanoma cells are not completely eliminated. This emphasizes the importance of complementary, non-cytolytic mechanisms of control involving cytokines such as TNF-α. Of note, the function of TRM cells in controlling persisting melanomas is reminiscent of their presumed role in the local containment of persisting and latent-reactivating viruses, such as HSV and Epstein–Barr Virus11,29,30, implying that TRM-mediated control of persisting threats via suppression and containment rather than elimination is a broadly operative mode of immunity. In summary, our results provide strong impetus for exploring TRM cells as prognostic markers and future targets of cancer immunotherapies.

Methods

Mice

C57BL/6, gBT-I (ref. 31), gBT-I × B6.SJL-PtprcaPep3b/BoyJ (gBT-I.CD45.1), gBT-I.Thy1.1, gBT-I.uGFP, OT-I × B6.SJL-PtprcaPep3b/BoyJ (OT-I.CD45.1), Rag1–/–, Rag2–/–;Il2rg–/–,Il15–/–, Itgae–/–, Cd69–/–, Perf1–/–, Ifng–/–, Tnfa–/–, gBT-I.CD45.1 × Cd69–/–, gBT-I.CD45.1 × Tnfa–/– and B6(Cg)-Tyrc-2J/J (B6 Albino) mice were bred in the Department of Microbiology and Immunology, The University of Melbourne. gBT-I mice express transgenic T-cell receptors recognizing the HSV glycoprotein-B-derived epitope gB498–505, as described31. All mice were female and aged between 6–12 weeks at the beginning of experiments. All animal experiments (with a maximum endpoint at a tumour volume of 1,000 mm3) were approved by the relevant University of Melbourne Animal Ethics Committee.

B16 melanoma cell lines

B16F1-gB.GFP (B16.gB) and B16F10-Ova.GFP (B16.Ova) cells were generated by transduction with retroviral vectors containing a full-length membrane-bound form of HSV gB and enhanced GFP (eGFP), as described5. Expression of gB or Ova was confirmed using in vitro activation assays with transgenic T cells, gBT-I or OT-I, respectively. B16.gB cells expressing firefly luciferase (B16.gB.Luc) were generated by transduction of B16.gB cells with retroviruses expressing a puromycin acetyltransferase/luciferase fusion protein (pacLuc2) using the retroviral construct MSCV-ires-pacLuc2, as described5. This retroviral construct was provided by S. Baker and R. Williams of St Jude Children’s Research Hospital (Memphis, TN, USA). B16.Tyr–/–.mCherry cells were generated by transfecting B16F1 cells with pX330 expressing a single guide RNA targeting the tyrosinase (Tyr) gene (target sequence TGCCTCCTCTAAGAACTTGT). Single-cell clones were established and successful genome editing of the tyrosinase gene was verified by next-generation sequencing using the MiSeq platform. A clone (D8) with 1-nucleotide insertions in all alleles was selected and designated as B16.Tyr–/–. B16.Tyr–/–.mCherry or B16.mCherry cells were established by retroviral transduction with pRp-mCherry and subsequently expanded as a polyclonal culture. Subsequently, B16.Tyr–/–.mCherry or B16.mCherry cells were transduced with retroviral vectors containing full-length membrane bound gB and eGFP to yield B16.gB.Tyr–/–.mCherry or B16.gB.mCherry cells, respectively. All B16 cell lines tested negative for mycoplasma contamination and were cultured and passaged in RPMI medium containing 10% fetal calf serum (FCS), l-glutamine (4 mM ml−1), penicillin (1,000 units per ml), streptomycin (2 mg ml−1) and 2-mercaptoethanol (1 mM l−1) at 37 °C/6.5% CO2.

B16 melanoma inoculation and viral infection

For B16 melanoma inoculation, mice were anaesthetized with a 1/1 mixture of ketamine (100 mg kg−1, Parnell Laboratories) and xylazil (Troy Laboratories) by intraperitoneal injection, and lubricating eye gel (Allergen Australia) was applied to the eyes to prevent drying. Mice were shaved (with a Wahl razor) and depilated using Veet cream (Reckitt Benckiser). B16 melanoma cells were harvested by washing with PBS, then incubating cells at 37 °C for 3–5 min with 1 × trypsin/EDTA solution (Sigma) and washing with Hanks’ balanced saline solution (HBSS). For subcutaneous B16 inoculation, 1 × 105 B16.gB cells were suspended in 50 µl HBSS and injected under the left flank using a 30G needle. For epicutaneous inoculation, left flank skin was lightly abraded by application of a power tool with grindstone attachment (Dremel) for 10–15 s with constant rotation, and the scarified site was wiped with a cotton tipped applicator (Livingstone) soaked in PBS. B16.gB cells (1 × 105) were suspended in 10 µl Matrigel basement membrane matrix (Corning) and applied to the scarified region. Mice were rested for about 10 min to allow solidification of Matrigel before application of Op-site Flexigrid (Smith and Nephew) over the gel. Mice were bandaged by wrapping micropore and transpore surgical tape (3M) around the torso and bandages were removed 4 days later. Developing tumours were measured using a digital caliper and volume estimated using the formula: volume = ((width2 × length)/2). HSV infections were performed by scarification using 1 × 106 plaque-forming units of the KOS strain of HSV-1, as described32.

Flow cytometry

Lymphocytes were isolated from the spleen and lymph nodes by grinding organs through a metal mesh to create single-cell suspensions. T cells were isolated from the skin as described8. Briefly, skin was incubated in Dispase solution (Roche, 2.5 mg ml−1) for 90 min and the epidermis separated from the dermis. The dermis was finely chopped and incubated in collagenase type III (Worthington, 3 mg ml−1) and the epidermis placed in trypsin/EDTA (Sigma) and incubated at 37 °C for 30 min. Alternatively, skin was incubated in liberase TL research grade solution (Sigma, 0.25 mg ml−1) for 20 min and the epidermis separated from the dermis then chopped in liberase TL research grade solution (Sigma, 0.25 mg ml−1) and incubated for a further 60 min. T cells were isolated from tumours by placing melanomas in collagenase type III, chopping with scissors, incubating samples at 37 °C for 90 min then grinding tissue through a 70-µm nylon filter to create a single-cell suspension. Tumour-cell suspensions were treated with red blood cell lysis buffer (Sigma) before staining.

For in situ cytokine-production assays, mice were injected with 100 µg of gB or OVA peptide diluted in PBS containing 0.25 mg ml−1 brefeldin A (BFA, Sigma Aldrich) for 4–5 h before organ harvest. Skins and tumours were processed as normal in dispase and collagenase containing 0.02 µg BFA. Cells were stained with antibodies and their expression of markers determined using a BD Fortessa (BD Biosciences) and analysed using Flowjo 9 (Treestar). Antibodies used were: anti-mouse CD45.1 (A20), CD45.2 (104), CD8α (53-6.7), Vα2 (B20.1), CD69 (H1.2F3), CD16/CD32 (2.4G2), CD44 (IM7), CD62L (MEL-14), PD-1 (J43), IFN-γ (XMG1.2), TNF (MP6-XT22) from BD Biosciences; anti-mouse CD45.1 (A20), CD8α (53-6.7), CD103 (2E7), KLRG1 (2F1), PD-1 (J43) from eBiosciences/Thermofisher Scientific; and anti-mouse CD45.2 (104), CD103 (2E7), CD8α (53-6.7), Thy1.1 (OX-7), CD69 (H1.2F3) and PD-1 (29F.1A12) from Biolegend. For in situ cytokine assays, samples were fixed and stained for intracellular cytokines using a Foxp3/transcription-factor-staining buffer kit according to the manufacturer’s instructions (eBioscience). Cell viability was determined using either a fixable LIVE/DEAD near-infrared cell-staining kit (BD Biosciences) or fixable Zombie Aqua or Zombie Yellow kits (Biolegend). Cells were enumerated by adding SPHERO calibration particles (BD Biosciences) to each sample before acquisition using a BD Fortessa II, or sorted using a BD FACS Aria III (both BD Biosciences).

Quantitative real-time PCR

RNA was extracted from sorted samples using a RNeasy micro kit (Qiagen) or Direct-Zol RNA microprep kit (Zymo Research) and then converted to complementary DNA using a high-capacity cDNA reverse transcription kit (Thermofisher Scientific) according to the manufacturer’s instructions. Genes of interest were preamplified from cDNA using Taqman gene-expression assays: Ctla4 (Mm00486849_m1), Pdcd1 (Mm01285676_m1), Lag3 (Mm00493071_m1), Tigit (Mm03807533_m1) and Taqman preamp master mix (Life Technologies). Real-time quantitative PCR was performed with the same Taqman gene-expression assays and Taqman fast advanced master mix (Life Technologies) using a Quantasoft 7 real-time PCR machine (Thermofisher Scientific). Cycle-threshold values were determined for each gene and normalized to the housekeeping genes Hprt (Mm00446968_m1), Gapdh (Mm99999915_g1) and Tbp (Mm00446973_m1).

Intravital two-photon microscopy

Mice were anaesthetized with isoflurane (Cenvet: 2.5% for induction, 1–1.5% for maintenance) vaporized in an 80/20 mixture of O2 and air, and shaved on the left flank, with hair depilated using Veet; then surgery was performed as described6. Briefly, two incisions were made along the left flank approximately 2–2.5 cm apart either side of the tumour or Dremel site, and the skin was separated from the peritoneum using scissors. An 18-mm-wide piece of 1-mm stainless steel was inserted between the peritoneum and dermis to form a stable raised platform that was attached to a custom-made imaging platform. The dermis was adhered to the stainless-steel platform with Vetbond tissue adhesive (3M). Vacuum grease (Dow Corning) was applied at the edges of the skin and a glass coverslip was placed over the skin and sealed using the vacuum grease. Incision sites were regularly irrigated with PBS to prevent dehydration of the peritoneum during imaging. Images were acquired with an upright FV-MPERS (Olympus) multiphoton microscope with a 25× /1.05NA water-immersion objective enclosed in a heated chamber maintained at 35 °C. Fluorescence excitation was provided with Mai-Tai (690–1,040 nm) and Insight (680–1,300 nm) lasers. mCherry was excited at 1,100 nm, and eGFP and collagen (visualized by second harmonic generation, SHG) were excited at 950 nm. For four-dimensional data sets, three-dimensional stacks were captured at a resolution of 512 × 512 pixels every 60–75 s over a period of 1–2 h with 2.5–3.5-µm intervals. Raw imaging data were processed, and movies were generated in Imaris 8 or Imaris 9 (Bitplane) and edited using Adobe After Effects.

Intravenous and epicutaneous T-cell transfer

For adoptive T-cell transfer, naive gBT-I.CD45.1, gBT-I.Thy1.1 or gBT-I.uGFP T cells were isolated from lymph nodes of donor mice and 0.5 × 105 to 1 × 105 cells injected intravenously into recipient mice at least 1 day before B16 melanoma inoculation or HSV infection. For epicutaneous T-cell transfer or intravenous transfer of in vitro activated CD8+ T cells, transgenic gBT-I.CD45.1, gBT-I.Thy1.1 or OT-I.CD45.1 T cells were activated in vitro for 4–5 days with gB498–505 (SSIEFARL) or OVA257–264 (SIINFEKL) peptide-pulsed splenocytes in the presence of recombinant human interleukin (IL)-2 (25 units per ml, Peprotech), as described8. Activated transgenic T cells suspended in Matrigel basement membrane matrix solution (1 × 106 cells per 10 µl) were transferred in an identical manner to that described above for epicutaneous B16 melanoma cell inoculation, except that a total of 4 × 106 T cells were transferred to mice by application of 4 × 10 µl of Matrigel cell suspension to four adjacent abrasion sites arranged in a cloverleaf shape. For transfer of in vitro activated CD8+ T cells for qPCR experiments, gBT-I cells (10 × 106) were injected intravenously into recipient mice bearing macroscopic melanoma tumours.

In vivo bioluminescence imaging

Mice were injected intraperitoneally with 150 mg per kg of d-luciferin potassium salt (Thermofisher Scientific) in PBS and left to rest for 5 min, before being anaesthetized with isoflurane (Cenvet: 2.5%) vaporized in an 80/20 mixture of O2 and air, shaved on the left flank and depilated using Veet cream, as described above. Images were acquired using an IVIS Lumina XRMS series III imaging system (Perkin Elmer) with an exposure of 300 s. Images were analysed with Living Image v4.4 software.

Genomic DNA extraction and ddPCR

Tumours, non-developer skin corresponding to the abraded site or untreated skin were harvested and placed in 0.5-ml polypropylene tubes containing 1.4-mm ceramic beads (soft tissue homogenizing mix, Omni) and DNA lysis buffer (50 mM Tris, 50 mM EDTA, 1% SDS in MilliQ H2O, pH8). Tissues were homogenized by 2 × 30 s rounds of shaking in a Bead Ruptor 24 Elite (Omni) at a speed of 8 m s−1 and digested overnight with proteinase-K (12 milli arbitrary units, Qiagen) at 55 °C in a shaking incubator. The lysate was mixed with ice-cold ammonium acetate (7.5 M), and then tubes were centrifuged and genomic DNA extracted by mixing the supernatant with 100% isopropanol and washing the DNA pellet with 70% ethanol/MilliQ H2O solution. DNA pellets were resuspended in Tris/EDTA buffer (pH 8) and passed through a DNeasy spin column (Qiagen). ddPCR reactions comprised about 3–10% of total extracted gDNA (415 ng DNA per well × 4 wells per sample), ddPCR supermix for probes (BioRad), HindIII enzyme (5 IU per well, New England BioLabs), forward/reverse primers (900 nM) and probes (250 nM) specific for luc or gB and Vim. Droplets were generated and read using a QX200 AutoDG droplet digital PCR System and a C1000 Touch thermal cycler (all BioRad) according to the manufacturer’s instructions. Primers and probes were purchased from Integrated DNA Technologies (Luc, forward: 5′-GACACCGGTAAGACACTGGG-3′, reverse: 5′-GCCTCGGGGTTGTTAACGTA-3′, probe: 5′-FAM/GCGTCCGTG/ZEN/GCCCCATGATC/3IABkFQ-3′; and Vim, forward: 5′-AGCTGCTAACTACCAGGACACTATTG-3′, reverse: 5′-CGAAGGTGACGAGCCATCTC-3′, probe: 5′-HEX/CCTTCATGT/ZEN/TTTGGATCTCATCCTGCAGG/3IABkFQ-3′) or Life Technologies (HSV-gB, forward: 5′-GCAGTACTACCTGGCCAATGG-3′, reverse: 5′-CGCGAGCGTGTTGCT-3′, probe: 5′-FAM/ATCGCGTACCAGCCCC/NFQ-3′). Vim quantification was used as a housekeeping positive control. Data were analysed using QuantaSoft Software V1.7 (BioRad).

Human melanoma samples

The human melanoma samples (n = 68 for lymph nodes; n = 3 for skin) were obtained from The Melanoma Institute Australia biospecimen bank with written informed patient consent and institutional review board approval (The Sydney Local Health District Human Research Ethics Committee, protocol numbers X15-0454 and HREC/11/RPAH/444). Their analysis was undertaken in accordance with the National Health and Medical Research Council of Australia’s National Statement on Ethical Conduct in Human Research. Patients were selected on the basis of clinical and pathological confirmation of cutaneous melanoma (mucosal and acral melanomas excluded), and all patients had not received any systemic treatment or radiotherapy in the biopsied area before surgery. All samples analysed in this study were from lymph-node or skin metastases and a detailed clinical overview of all the patients has been described previously17. Images displayed in Fig. 2 were taken from two representative patient samples with the following characteristics—patient 1, age: 56, gender: male, site: lymph node; and patient 2, age: 77, gender: female, site: subcutaneous skin.

Multiplex immunofluorescence microscopy on human tissue

Melanoma paraffin-embedded tissue sections were first deparaffinized, rehydrated, and treated with heat-induced antigen-retrieval buffer (pH 9). All staining was performed on a Dako autostainer. Briefly, sections were incubated with 3% hydrogen peroxide for 10 min at room temperature, and then incubated with a single primary antibody (against CD8 (Ab4055), CD103 (EPR4166(2)) or Sox10 (Biocare-BC34)) made up in Da Vinci green diluent solution (Biocare Medical) for 35 min. Sections were then washed and incubated with a probe antibody (rabbit or mouse MACH3 probe, Biocare Medical) specific to the species of the primary antibody for 10 min, washed and then incubated for a further 10 min with a horseradish-peroxidase (HRP)-conjugated antibody (rabbit or mouse MACH3 HRP, Biocare Medical) specific to the probe. Following this, sections were washed and then incubated with opal fluorophores at a 1/50 dilution made up in tyramide signal amplification (TSA) reagent (Opal 7-Colour IHC, Perkin Elmer, USA). Between subsequent staining runs, tissues were boiled in pH 9 antigen-retrieval buffer to strip the primary antibody complex from the sample. Single-colour controls were set up alongside the test panel in order to determine background fluorescence and nonspecific binding. Images were taken using a standard fluorescent microscope fitted with an automated quantitative pathology system (Vectra) in conjunction with Vectra 3.3 and inForm 2.3.0 software (Perkin Elmer).

Dinitrofluorobenzene treatment

Mice were shaved and depilated before application of 15 µl of dinitrofluorobenzene (DNFB, 0.25%) in acetone and oil (4/1) to a 1.5-cm2 region of skin on the same day as in vitro activated T-cell transfer.

Depletion of gBT-I.Thy1.1 T cells

To deplete circulating gBT-I.Thy1.1 cells, we injected mice intraperitoneally 2–4 times with 0.5–1 µg anti-mouse/rat Thy1.1 monoclonal antibody (anti-Thy1.1, clone HIS51; eBioscience) in PBS more than 30 days after gBT-I cell transfer; the mice then rested for at least 7 days before subsequent tumour challenge. Depletion of circulating gBT-I.Thy1.1 cells was confirmed by flow cytometric analysis of blood samples from the tail vein of mice more than 7 days after depletion. For depletion of skin gBT-I.Thy1.1 cells, mice were injected intradermally with 2 × 10 µg and 1 × 5 µg doses of anti-Thy1.1 antibody diluted in PBS (100 µl total volume) using a 30G needle over 3 days, with a second round of intradermal anti-Thy1.1 injections occurring more than 30 days after the initial treatment phase. Control mice received PBS alone.

Statistics and reproducibility

Two-tailed Mann–Whitney U-tests and Mantel–Cox tests were used where indicated. Numerical values stated in the main text are given as the mean ± standard error of the mean (s.e.m.). All statistical analyses were performed in Prism 7 (Graphpad) and are two-sided. The experiments were not randomized and the investigators were not blinded to allocation during experiments and outcome assessment. No statistical methods were used to predetermine sample size. All experiments were performed at least twice, either with similar results obtained and representative data shown, or with pooled data shown. Survival curves, dotted bar graphs and pie charts with pooled data from multiple experiments include all experiments performed. Photographs are representative of at least three biologically independent experiments repeated with similar results. Bioluminescence imaging data are from two biologically independent experiments. Where representative histograms are shown, data reflect at least two independent experiments with at least four mice per experiment, in which similar results were obtained.

Reporting summary

Further information on experimental design is available in the Nature Research Reporting Summary linked to this paper.