ABSTRACT: Importance:Therapeutic options are needed for patients with advanced gastric cancer whose disease has progressed after 2 or more lines of therapy. Objective:To evaluate the safety and efficacy of pembrolizumab in a cohort of patients with previously treated gastric or gastroesophageal junction cancer. Design, Setting, and Participants:In the phase 2, global, open-label, single-arm, multicohort KEYNOTE-059 study, 259 patients in 16 countries were enrolled in a cohort between March 2, 2015, and May 26, 2016. Median (range) follow-up was 5.8 (0.5-21.6) months. Intervention:Patients received pembrolizumab, 200 mg, intravenously every 3 weeks until disease progression, investigator or patient decision to withdraw, or unacceptable toxic effects. Main Outcomes and Measures:Primary end points were objective response rate and safety. Objective response rate was assessed by central radiologic review per Response Evaluation Criteria in Solid Tumors, version 1.1, in all patients and those with programmed cell death 1 ligand 1 (PD-L1)-positive tumors. Expression of PD-L1 was assessed by immunohistochemistry. Secondary end points included response duration. Results:Of 259 patients enrolled, most were male (198 [76.4%]) and white (200 [77.2%]); median (range) age was 62 (24-89) years. Objective response rate was 11.6% (95% CI, 8.0%-16.1%; 30 of 259 patients), with complete response in 2.3% (95% CI, 0.9%-5.0%; 6 of 259 patients). Median (range) response duration was 8.4 (1.6+ to 17.3+) months (+ indicates that patients had no progressive disease at their last assessment). Objective response rate and median (range) response duration were 15.5% (95% CI, 10.1%-22.4%; 23 of 148 patients) and 16.3 (1.6+ to 17.3+) months and 6.4% (95% CI, 2.6%-12.8%; 7 of 109 patients) and 6.9 (2.4 to 7.0+) months in patients with PD-L1-positive and PD-L1-negative tumors, respectively. Forty-six patients (17.8%) experienced 1 or more grade 3 to 5 treatment-related adverse events. Two patients (0.8%) discontinued because of treatment-related adverse events, and 2 deaths were considered related to treatment. Conclusions and Relevance:Pembrolizumab monotherapy demonstrated promising activity and manageable safety in patients with advanced gastric or gastroesophageal junction cancer who had previously received at least 2 lines of treatment. Durable responses were observed in patients with PD-L1-positive and PD-L1-negative tumors. Further study of pembrolizumab for this group of patients is warranted. Trial Registration:clinicaltrials.gov Identifier: NCT02335411.