One in five people with diabetes is overtreated with medications that are meant to control blood sugar but end up endangering their health in the process, finds a new study published in JAMA Internal Medicine.

The problem: Trying to control blood sugar levels too aggressively—for everyone.

The approach, called “intensive control,” can make sense for some generally healthy younger people with diabetes. But for people who have other health problems in addition to diabetes, whose diabetes is difficult to control, or who are older than 75, such an approach increases the odds of landing in the hospital with a potentially life-threatening episode of low blood sugar (hypoglycemia).

In the latest study, of 30,000 people with diabetes, about 21% fit into the more medically complex category—and for them, intensive control nearly doubled the risk for dangerous hypoglycemia episodes over the next two years, from 1.7% to 3%. And that doesn’t count the episodes that may have been disturbing and uncomfortable but didn’t require medical treatment.

The irony is that according to current guidelines, these patients didn’t even qualify for intensive control. They were treated to bring their A1c levels, a measure of long-term blood sugar control, below 7%. But a more clinically appropriate goal would be 7.5% to 8%, or in some cases, even higher. As the authors state, “despite these recommendations, intensive control remains prevalent among older, sicker patients with diabetes.”

Here’s how it often happens: You’ve been sticking to a 7% goal, but as you get older or develop other health conditions, it gets harder to keep to that number. So your doctor prescribes extra medication—either a new oral pill or, perhaps, insulin injections—to bring your A1c number down.

Here’s what should have happened instead: Your doctor recognizes that you no longer benefit from this aggressive approach and raises your A1c goal—that is, treats the patient, not the number.

On the other hand, for the 80% of patients in the study who were healthier or younger or both, intensive control to an A1c below 7% increased the risk for hypoglycemic episodes hardly at all—from 1.2% to 1.3% over two years. Plus, it has health benefits, such as reducing the risk for cardiovascular disease over the next decade or more. For them, it may be a risk worth taking.

But it’s not an approach that is good for everyone. To learn more, see Bottom Line’s article, “Is Your Doctor Trying Too Hard to Control Your Diabetes?