Immune checkpoint inhibitors result in impressive clinical responses, but optimal results will require combination with each other and other therapies. This raises fundamental questions about mechanisms of non-redundancy and resistance. Here we report major tumour regressions in a subset of patients with metastatic melanoma treated with an anti-CTLA4 antibody (anti-CTLA4) and radiation, and reproduced this effect in mouse models. Although combined treatment improved responses in irradiated and unirradiated tumours, resistance was common. Unbiased analyses of mice revealed that resistance was due to upregulation of PD-L1 on melanoma cells and associated with T-cell exhaustion. Accordingly, optimal response in melanoma and other cancer types requires radiation, anti-CTLA4 and anti-PD-L1/PD-1. Anti-CTLA4 predominantly inhibits T-regulatory cells (Treg cells), thereby increasing the CD8 T-cell to Treg (CD8/Treg) ratio. Radiation enhances the diversity of the T-cell receptor (TCR) repertoire of intratumoral T cells. Together, anti-CTLA4 promotes expansion of T cells, while radiation shapes the TCR repertoire of the expanded peripheral clones. Addition of PD-L1 blockade reverses T-cell exhaustion to mitigate depression in the CD8/Treg ratio and further encourages oligoclonal T-cell expansion. Similarly to results from mice, patients on our clinical trial with melanoma showing high PD-L1 did not respond to radiation plus anti-CTLA4, demonstrated persistent T-cell exhaustion, and rapidly progressed. Thus, PD-L1 on melanoma cells allows tumours to escape anti-CTLA4-based therapy, and the combination of radiation, anti-CTLA4 and anti-PD-L1 promotes response and immunity through distinct mechanisms.