In the SELECT cardiovascular outcomes trial, semaglutide showed a 20% reduction in major adverse cardiovascular events in 17,604 adults with preexisting cardiovascular disease, overweight or obesity, without diabetes. Here in this prespecified analysis, we examined effects of semaglutide on weight and anthropometric outcomes, safety and tolerability by baseline body mass index (BMI). In patients treated with semaglutide, weight loss continued over 65 weeks and was sustained for up to 4 years. At 208 weeks, semaglutide was associated with mean reduction in weight (−10.2%), waist circumference (−7.7 cm) and waist-to-height ratio (−6.9%) versus placebo (−1.5%, −1.3 cm and −1.0%, respectively; P < 0.0001 for all comparisons versus placebo). Clinically meaningful weight loss occurred in both sexes and all races, body sizes and regions. Semaglutide was associated with fewer serious adverse events. For each BMI category (<30, 30 to <35, 35 to <40 and ≥40 kg m−2) there were lower rates (events per 100 years of observation) of serious adverse events with semaglutide (43.23, 43.54, 51.07 and 47.06 for semaglutide and 50.48, 49.66, 52.73 and 60.85 for placebo). Semaglutide was associated with increased rates of trial product discontinuation. Discontinuations increased as BMI class decreased. In SELECT, at 208 weeks, semaglutide produced clinically significant weight loss and improvements in anthropometric measurements versus placebo. Weight loss was sustained over 4 years. ClinicalTrials.gov identifier: NCT03574597.