(RNS) Omid Safi was diagnosed with diabetes more than a decade ago. For him, there were no ifs, ands or buts about what that meant:

A devoted Muslim, he could no longer fast during the holy month of Ramadan.

But fasting from food and drink, from sunrise to sunset, is a core pillar of Islam. So for a little while, he did try to fast anyway. “Then I passed out,” laughed Safi, director of Duke University’s Islamic Studies Center. “And my doctors said, ‘Don’t fast.’ So I stopped.”

That decision isn’t always easy for the world’s estimated 148 million Muslim diabetics. Though most physicians and religious scholars alike advise them not to fast, many still do.

The fast is obligatory for healthy Muslim adults. Most Islamic scholars offer an exemption to fasting for people whose health would be put at risk: Travelers, children, the elderly, the chronically ill, for example, are absolved (though many in each category still fast). Women who are menstruating, pregnant or breastfeeding are also exempt (though, again, plenty of women fast regardless). Instead, they can make up the missed fasts afterward or pay for a meal to help someone less fortunate break their fast.

According to Osama Hamdy, medical director of the Joslin Diabetes Center’s Obesity Clinical Program, the list of exemptions also includes Type 1 diabetics who take insulin and Type 2 diabetics on a mixed insulin regimen. Particularly in this summer's 16-hour fasts, the risk of adverse medical conditions, such as dehydration, ketoacidosis, hypoglycemia and hyperglycemia, are too high.

But Hamdy said most such patients dismiss these risks.

RELATED: How religious literacy can save lives

A 2015 study published in Diabetes Medicine found that 94 percent of Muslims with Type 2 diabetes fast for at least half of Ramadan; about 64 percent reported fasting daily. Why? A smaller study of British Muslim diabetics found that more than half of participants fast, usually through a sense of religious obligation or because of social or family pressure.

“(Doctors) have always said ‘don't fast,’” one 43-year-old woman with Type 2 diabetes told researchers. “I suppose if they are not from that cultural background they won't understand it anyhow. To them it's what you've got to do for your health.”

Such responses are leading medical professionals to switch gears when it comes to diabetics with lower and moderate risk. Some are teaming up with imams and Muslim organizations to hammer home the message that fasting while diabetic is not obligatory in Islam. And others are offering patients advice on how to safely fast while diabetic, rather than leaving it at “don’t fast.”

In the U.K., the Muslim Council of Britain has issued a Ramadan guide for diabetics. Groups like Diabetes UK and Boston’s Joslin Diabetes Center have prepared specific material for Muslim patients. With about 1.8 million Muslim adults in the U.S. and a 9.3 percent rate of diabetes, they’re targeting an estimated 165,000 people.

Last year, Hamdy helped the International Diabetes Federation and Diabetes and Ramadan International Alliance co-produce a 144-page guide for health care professionals to help diabetic Muslims fast as safely as possible.

Even diabetics who are conscientious about managing their condition can have difficulty fasting if they do so without medical supervision. "People assume they can eat a lot of sugar to raise their blood sugar levels quickly after breaking their fast," Hamdy says. "But people actually overcorrect. One or two dates is actually more than enough."

The DAR Alliance consulted closely with the grand mufti of Egypt, who offered a weighty opinion as part of its guide: “If it is confirmed that fast will cause harm to the diabetics … the patient should obey the physician and break the fast; otherwise he will be (a) sinner."

But there are certain emotional connections to Ramadan that are hard to overcome.

Two years ago, for instance, a 65-year-old diabetic in Jordan told The Associated Press he would continue fasting, despite having lost part of his leg and most of his sight because of his mismanaged health.

“God will protect us,” the bedridden man said then. “I will not violate the fast even if I die.”

Hamdy said that kind of fatalistic attitude is common among Muslim patients.

“People say, ‘OK, if God decides that I’m going to die, then I will die. Nothing will prevent me from death,” Hamdy said. “And then they fast, putting themselves at very, very high risk.” Such an extreme attitude is dangerous – even sinful, he said.

Even if their physician has approved fasting, it’s critical to continue checking blood sugar levels frequently throughout the day. (Hamdy emphasized that doing so doesn’t break the fast, a common misconception.) And if it’s low, it’s very dangerous to continue fasting. “People think that they can just wait it out if there is one hour left until iftar,” Hamdy said, referring to the evening break-fast meal. “The reality is those people can pass into a coma or have a seizure” if they don’t immediately break the fast.

For diabetics who do chose not to fast, Ramadan is often filled with a sense of guilt or isolation. One woman told researchers she ate in secret, so her family wouldn’t see. “I used to fast from the age of 5 and I have been fasting until I started on the insulin,” she explained. “I just feel like you can't do what you're supposed to do as part of your religion, and I definitely feel guilty.”

Safi said he doesn’t feel guilty, having once experienced a “frightening” hypoglycemic attack that left him feeling paralyzed in place. But the isolation is there when he’s at the mosque: “I don’t feel like I personally have the right to be in an iftar setting among people breaking their fasts,” he said.

But much of Safi’s Ramadan remains the same: It’s still about controlling his urge to do what God has not made halal, or permissible, for him.

For him, Ramadan is about fasting from the fast.