Background: Existing guidelines for management of type 2 diabetes recommend a patient-centred approach to guide the choice of pharmacological agents. Although glucagon-like peptide-1 (GLP-1) receptor agonists and sodium–glucose cotransporter-2 (SGLT2) inhibitors are increasingly used as second-line agents, direct comparisons between these treatments are insufficient. In the SUSTAIN 8 trial, we compared the efficacy and safety of semaglutide (a GLP-1 receptor agonist) with canagliflozin (an SGLT2 inhibitor) in patients with type 2 diabetes.Methods: This was a double-blind, parallel-group, phase 3b, randomised controlled trial done at 111 centres in 11 countries. Eligible patients were at least 18 years old and had uncontrolled type 2 diabete...