Therapeutic blockade of the axis of programmed cell death 1 (PD-1) and its ligand (PD-L1) has transformed the management of non-small-cell lung cancer (NSCLC). Clinical trials with pembrolizumab have enrolled patients with performance status (PS) 0-1. However, around 18% of patients with NSCLC are PS2, and the activity and safety of pembrolizumab in these patients is unclear. We aimed to evaluate the safety and efficacy of pembrolizumab in these patients. We did a multicentre, single-arm, open-label, phase 2 trial (PePS2) in ten hospitals in the UK, in which patients with NSCLC and a rigorous ascription of PS2 were given pembrolizumab 200 mg every 3 weeks. No masking was used in this trial. We stratified the treatment evaluation by tumour proportion score (TPS) and line of therapy. Co-primary outcomes were: (1) durable clinical benefit (DCB), defined as the occurrence of complete response, partial response, or stable disease that continues until at least the second CT scan scheduled at 18 weeks; and (2) toxicity, defined as the occurrence at any time of treatment-related dose delay or treatment discontinuation due to an adverse event. Analysis included all patients who received any pembrolizumab. As well as reporting simple observed incidence for the co-primary outcomes, DCB and toxicity, we also estimated incidence using a model-based method for correlated binary outcomes. This study is registered with ClinicalTrials.gov, NCT02733159; EudraCT, 2015-002241-55; and ISRCTN, 10047797. Between Jan 4, 2017, and Feb 13, 2018, of 112 patients assessed for eligibility, we recruited 62 patients. 60 patients were evaluable for the co-primary outcomes. Median age was 72 years (IQR 65-75); 33 (55%) of participants were male and 27 (45%) were female. The observed incidence for DCB was 38% (95% CI 21-57) in first-line patients (n=24) and 36% (22-52) in subsequent-line patients (n=36); DCB was 22% (11-41) in patients with a TPS less than 1% (n=27), 47% (25-70) in patients with a TPS of 1-49% (n=15), and 53% (30-75) in patients with a TPS of 50% or greater (n=15). An increase in DCB incidences with TPS was also shown in model-based estimates. Toxicity was observed in 28% (95% CI 19-41) of patients, 11 (18%) of 60 due to dose delay and 6 (10%) of 60 due to drug discontinuation. No grade 5 treatment-related adverse events were observed and no early deaths were attributed to hyperprogression. The most common grade 3-4 adverse events were dyspnoea (n=9), hyponatraemia (n=5), and anorexia (n=4). There were ten serious adverse events considered to be related to treatment, comprising diarrhoea (n=3) and acute kidney injury, adrenal insufficiency, hyperbilirubinaemia, oral mucositis, rash, urinary tract infection, and vomiting (n=1 each). Patients with NSCLC of PS2 are a group of patients of unmet therapeutic need. The PePS2 trial shows that pembrolizumab can be safely administered to these patients, with no increase in the risk of immune-related or other toxicities. Efficacy outcomes are at least as good as those in patients with PS0-1 and the data provides clinicians with the confidence to incorporate pembrolizumab into the treatment pathway of patients with NSCLC of PS2. Merck, Sharp & Dohme.