Background: Nosocomial pneumonia due to antimicrobial-resistant pathogens is associated with high mortality. We assessed the efficacy and safety of the combination antibacterial drug ceftolozane–tazobactam versus meropenem for treatment of Gram-negative nosocomial pneumonia. Methods: We conducted a randomised, controlled, double-blind, non-inferiority trial at 263 hospitals in 34 countries. Eligible patients were aged 18 years or older, were undergoing mechanical ventilation, and had nosocomial pneumonia (either ventilator-associated pneumonia or ventilated hospital-acquired pneumonia). Patients were randomly assigned (1:1) with block randomisation (block size four), stratified by type of nosocomial pneumonia and age (<65 years vs ≥65 years), to receive either 3 g ceftolozane–tazobactam or 1 g meropenem intravenously every 8 h for 8–14 days. The primary endpoint was 28-day all-cause mortality (at a 10% non-inferiority margin). The key secondary endpoint was clinical response at the test-of-cure visit (7–14 days after the end of therapy; 12·5% non-inferiority margin). Both endpoints were assessed in the intention-to-treat population. Investigators, study staff, patients, and patients' representatives were masked to treatment assignment. Safety was assessed in all randomly assigned patients who received study treatment. This trial was registered with ClinicalTrials.gov, NCT02070757. Findings: Between Jan 16, 2015, and April 27, 2018, 726 patients were enrolled and randomly assigned, 362 to the ceftolozane–tazobactam group and 364 to the meropenem group. Overall, 519 (71%) patients had ventilator-associated pneumonia, 239 (33%) had Acute Physiology and Chronic Health Evaluation II scores of at least 20, and 668 (92%) were in the intensive care unit. At 28 days, 87 (24·0%) patients in the ceftolozane–tazobactam group and 92 (25·3%) in the meropenem group had died (weighted treatment difference 1·1% [95% CI −5·1 to 7·4]). At the test-of-cure visit 197 (54%) patients in the ceftolozane–tazobactam group and 194 (53%) in the meropenem group were clinically cured (weighted treatment difference 1·1% [95% CI −6·2 to 8·3]). Ceftolozane–tazobactam was thus non-inferior to meropenem in terms of both 28-day all-cause mortality and clinical cure at test of cure. Treatment-related adverse events occurred in 38 (11%) of 361 patients in the ceftolozane–tazobactam group and 27 (8%) of 359 in the meropenem group. Eight (2%) patients in the ceftolozane–tazobactam group and two (1%) in the meropenem group had serious treatment-related adverse events. There were no treatment-related deaths. Interpretation: High-dose ceftolozane–tazobactam is an efficacious and well tolerated treatment for Gram-negative nosocomial pneumonia in mechanically ventilated patients, a high-risk, critically ill population. Funding: Merck & Co.