Safiglipron is an oral small-molecule glucagon-like peptide-1 (GLP-1) receptor agonist administered without fasting or dietary restrictions. We evaluated its efficacy and safety versus dapagliflozin in OUTSTAND-2, a phase 3, multicenter, randomized, double-blind, double-dummy, active-comparator-controlled trial conducted at 98 sites in China. We randomized 810 adults (mean hemoglobin A1C (HbA1c) 8.60%, median diabetes duration 5.0 years, 35.7% women) to safiglipron 30 mg (n = 202), safiglipron 60 mg (n = 203), safiglipron 90 mg (n = 203) or dapagliflozin 10 mg (n = 202) for 32 weeks, followed by a 20-week active-treatment extension. For the primary endpoint, treatment differences versus dapagliflozin in change from baseline in HbA1c at week 32 under the primary non-inferiority estimand were -0.30% (95% confidence interval (CI): -0.51 to -0.09), -0.22% (-0.44 to -0.01) and -0.40% (-0.62 to -0.19) for safiglipron 30 mg, 60 mg and 90 mg, respectively, establishing non-inferiority for all three doses (all P < 0.0001; non-inferiority margin 0.4%). Under the treatment policy estimand, 90 mg met the prespecified statistical criterion for superiority (difference -0.25%; 95% CI: -0.45 to -0.05; one-sided P = 0.0067), whereas 60 mg did not (P = 0.0789), after which fixed-sequence testing stopped. HbA1c target attainment rates with safiglipron versus dapagliflozin were 54.9-63.5% versus 36.5% for HbA1c <7.0% and 38.9-48.6% versus 16.1% for HbA1c ≤6.5%. Mean body weight changes were -2.35%, -3.55%, -4.17% and -3.60% for safiglipron 30 mg, safiglipron 60 mg, safiglipron 90 mg and dapagliflozin, respectively. Fasting plasma glucose, seven-point self-monitored blood glucose profiles, waist circumference, HOMA-β, HOMA-IR and changes in treatment satisfaction showed varying degrees of improvement from baseline with both safiglipron and dapagliflozin. Rescue therapy was used by 0.5-1.5% versus 0% of participants, respectively. Gastrointestinal adverse events were more frequent with safiglipron and mostly mild or moderate; adverse events led to treatment discontinuation in 4.0%, 4.0%, 3.9% and 1.5% of participants, respectively. Safiglipron provides an effective oral treatment option for adults with type 2 diabetes inadequately controlled with metformin. ClinicalTrials.gov identifier: NCT06589765 .