Background The impact of severe acute respiratory syndrome coronavirus 2 (SARS-CoV-2) on postoperative recovery needs to be understood to inform clinical decision making during and after the COVID-19 pandemic. This study reports 30-day mortality and pulmonary complication rates in patients with perioperative SARS-CoV-2 infection. Methods This international, multicentre, cohort study at 235 hospitals in 24 countries included all patients undergoing surgery who had SARS-CoV-2 infection confirmed within 7 days before or 30 days after surgery. The primary outcome measure was 30-day postoperative mortality and was assessed in all enrolled patients. The main secondary outcome measure was pulmonary complications, defined as pneumonia, acute respiratory distress syndrome, or unexpected postoperative ventilation. Findings This analysis includes 1128 patients who had surgery between Jan 1 and March 31, 2020, of whom 835 (740%) had emergency surgery and 280 (248%) had elective surgery. SARS-CoV-2 infection was confirmed preoperatively in 294 (261%) patients. 30-day mortality was 238% (268 of 1128). Pulmonary complications occurred in 577 (512%) of 1128 patients; 30-day mortality in these patients was 380% (219 of 577), accounting for 817% (219 of 268) of all deaths. In adjusted analyses, 30-day mortality was associated with male sex (odds ratio 175 [95% CI 128-240], p<00001), age 70 years or older versus younger than 70 years (230 [165-322], p<00001), American Society of Anesthesiologists grades 3-5 versus grades 1-2 (235 [157-353], p<00001), malignant versus benign or obstetric diagnosis (155 [101-239], p=0046), emergency versus elective surgery (167 [106-263], p=0026), and major versus minor surgery (152 [101-231], p=0047). Interpretation Postoperative pulmonary complications occur in half of patients with perioperative SARS-CoV-2 infection and are associated with high mortality. Thresholds for surgery during the COVID-19 pandemic should be higher than during normal practice, particularly in men aged 70 years and older. Consideration should be given for postponing non-urgent procedures and promoting non-operative treatment to delay or avoid the need for surgery. Funding National Institute for Health Research (NIHR), Association of Coloproctology of Great Britain and Ireland, Bowel and Cancer Research, Bowel Disease Research Foundation, Association of Upper Gastrointestinal Surgeons, British Association of Surgical Oncology, British Gynaecological Cancer Society, European Society of Coloproctology, NIHR Academy, Sarcoma UK, Vascular Society for Great Britain and Ireland, and Yorkshire Cancer Research.