Through analysis of the primary melanoma tumor microenvironment focusing on CD8+ T cell phenotypes, we identified that high levels of CD39+CD103+PD-1- CD8+ T cells (P2) were associated with improved outcomes for primary melanoma patients in univariate analysis. The gene discussed is CD8A; the disease is melanoma.