ImportanceBehavioral weight loss interventions have achieved success in primary care; however, to our knowledge, pragmatic implementation of a fully automated treatment that requires little researcher oversight has not been tested. Moreover, weight loss maintenance remains a challenge.ObjectiveTo evaluate the long-term effectiveness of an automated, online, behavioral obesity treatment program (Rx Weight Loss [RxWL]) at 12 months (primary end point) and 24 months when delivered pragmatically in primary care and to compare the effectiveness of 3 weight loss maintenance approaches.Design, Setting, and ParticipantsThis randomized clinical trial of RxWL, an online weight loss program, recruited patients from a Rhode Island primary care network with approximately 60 practices and 100 physicians. Eligible participants were primary care patients aged 18 to 75 years with overweight or obesity who were referred by their nurse care manager and enrolled between 2018 and 2020. All participants were included in the intention-to-treat analysis, whereas only those who engaged with maintenance intervention were included in the per-protocol analysis. Data were analyzed from August 2022 to September 2023.InterventionsAll participants were offered the same 3-month weight loss program, with randomization to one of three 9-month maintenance programs: control intervention (monthly online newsletters), monthly intervention (9 monthly video lessons and 1 week of self-monitoring per month), or refresher intervention (an introductory session and two 4-week periods of lessons and self-monitoring at 7 and 10 months).Main Outcomes and MeasuresThe primary outcome was weight change at 12 months using height and weight data collected from electronic medical records through 24 months.ResultsAmong the 540 participants (mean [SD] age, 52.8 [13.4] years; 384 females [71.1%]) in the intention-to-treat analysis, mean estimated 3-month weight loss was 3.60 (95% CI, −4.32 to −2.88) kg. At the 12-month primary end point, the amount of weight regained in the monthly (0.37 [95% CI, −0.06 to 0.81] kg) and refresher (0.45 [95% CI, 0.27 to 0.87] kg) maintenance groups was significantly less than that in the newsletter control maintenance group (1.28 [95% CI, 0.85 to 1.71] kg; P = .004). The difference in weight regain between the monthly and refresher maintenance groups was not statistically significant. This pattern persisted at 24 months. In the per-protocol analysis of 253 participants, mean weight loss at the end of the initial 3-month intervention was 6.19 (95% CI, −7.25 to −5.13) kg. Similarly, at 12 months there was less weight regain in the monthly (0.61 kg) and refresher (0.96 kg) maintenance groups than in the newsletter control maintenance group (1.86 kg).Conclusions and RelevanceResults of this randomized clinical trial indicate that pragmatic implementation of a 12-month automated, online, behavioral obesity treatment that includes 9 months of active maintenance produces clinically significant weight loss over 2 years in primary care patients with overweight or obesity. These findings underscore the importance of providing ongoing maintenance intervention to prevent weight regain.Trial RegistrationClinicalTrials.gov Identifier: NCT03488212