Medicare will start paying for a strategy to help millions of older Americans at high risk of diabetes from developing the disease. The new benefits, scheduled to begin in 2018, are part of an increasing shift in the federal entitlement program, from its half-century tradition of mainly covering treatment when beneficiaries are sick to paying to try to keep them healthy. The strategy to avert diabetes also is the first disease-prevention experiment, tested under part of the Affordable Care Act, which federal officials have concluded is worthwhile enough to adopt nationwide.

The decision was announced as part of an annual update in the fee schedule for doctors and other health care practitioners who care for the 55 million Americans insured through Medicare because they are 65 and older or have disabilities. In other changes included in the announcement, starting in January, Medicare will begin to pay more for primary-care doctors to manage patients’ chronic diseases as well as for collaboration between those doctors and mental health professionals. These improved payments, expected to total $140 million in their first year, are other ways that Medicare is encouraging certain models of health care.

Across the health-care system, evidence has accumulated over the years that preventive treatment is good for patients but does not always save money. Yet in deciding to incorporate the diabetes-prevention strategy as a Medicare benefit, federal health officials cited findings that it lowered Medicare spending by $2,650 per person over 15 months — less than the ACA experiment’s cost.

Under the experiment, which began in 2013, Medicare gave money to YMCAs and other nonprofits in eight states to work with older Americans who had pre-diabetes. Participants attended group meetings with a lifestyle coach who taught them to improve their diets, increase their physical activity and change their behavior in other ways that helped them control their weight — which can help prevent the onset of Type 2 diabetes.

Once the benefit begins, organizations running such prevention programs will need to be approved by the Centers for Disease Control and Prevention.

Federal health officials noted that more than 11 million people 65 and older — about 1 in 4 — have diabetes, putting them at risk of serious medical complications and increasing Medicare’s spending. Officials estimate that Medicare will spend $42 billion more this year on people with diabetes, compared with what it would have spent if they did not have the disease.