In two independent cohorts of anti-PD-1-treated melanoma patients, MHC-II positivity on tumour cells is associated with therapeutic response, progression-free and overall survival, as well as CD4+ and CD8+ tumour infiltrate. Here, CD8A is linked to melanoma.