A drug that’s used to help control blood sugar in people with diabetes has now been shown to help prevent or slow kidney disease, which causes millions of deaths each year and requires hundreds of thousands of people to use dialysis to stay alive.

Doctors say it’s hard to overstate the importance of this study, and what it means for curbing this problem, which is growing because of the obesity epidemic.

The study tested Janssen Pharmaceuticals’ drug Invokana. Results were discussed Sunday at a medical meeting in Australia and published by the New England Journal of Medicine.

About 30 million Americans and more than 420 million people worldwide have diabetes, and most cases are Type 2, the kind tied to obesity. It occurs when the body can’t make enough or properly use insulin, which turns food into energy.

This can damage the kidneys over time, causing disease and ultimately, failure. In the U.S., it’s responsible for nearly half a million people needing dialysis, and for thousands of kidney transplants each year.

Some blood pressure drugs lower this risk but they’re only partially effective. The new study tested Invokana, a daily pill sold now to help control blood sugar, to see if it also could help prevent kidney disease when added to standard treatments.

For the study, about 13,000 people with Type 2 diabetes and chronic kidney disease from around the world were to be given Invokana or dummy pills. Independent monitors stopped the study early, after 4,400 people had been treated for about 2.5 years on average, when it was clear the drug was helping.

Those on the drug had a 30 percent lower risk of one of these problems — kidney failure, need for dialysis, need for a kidney transplant, death from kidney- or heart-related causes, or other signs that kidneys were failing.

For every 1,000 people taking the drug for 2.5 years, there would be 47 fewer cases of one of these problems, researchers estimate.

Rates of serious side effects were similar in the drug and placebo groups including leg, foot or toe amputations, a concern raised by a previous study of Invokana. One side effect, when the body can’t produce enough insulin, was more frequent among those on Invokana but rare overall.

Janssen, which is part of Johnson & Johnson, sponsored the study and many authors work or consult for the company. The drug costs about $500 a month in the U.S. Out-of-pocket costs for patients may be different, depending on insurance.

The importance of this large and well-done study “cannot be overstated,” Drs. Julie Ingelfinger and Clifford Rosen, editors at the medical journal, wrote in an accompanying article.

In recent years, several studies have found that Invokana and some similar drugs can lower heart risks. The new results, showing that Invokana also may stall or prevent kidney failure, expand the potential benefits of the drug.