In 1921, an endocrinologist named Dr Henry Rawle Geyelin arrived at the annual meeting of the American Medical Association to deliver a talk on therapeutic fasting in the treatment of epileptic seizures. Ninety years later, Geyelin would probably be surprised to find that the same diet is being heralded as the latest magic weight-loss programme.

The ketogenic diet has been called the “new Atkins” and is being taken up by an increasing number of people. But Professor Thomas Seyfried from Boston College, who has conducted research on the regimen, urges caution. “This diet is not to be taken lightly and there are healthcare professionals who work specifically in administering it,” he says. “Done incorrectly, you can alter your blood lipid parameters, which is not healthy. But when done the correct way, the blood parameters for the heart look beautiful.”

That the diet exists at all is down to the persistence of Geyelin, who was also one of the first doctors in New York to use insulin as a treatment for diabetes. But his ideas were not new. The ancient Greeks had discovered that one of the best ways to manage epileptic seizures was to stop eating, a finding that particularly fascinated Hippocrates. Unfortunately, it clearly was not a long-term solution. Both Hippocrates and Geyelin discovered that once fasting was over, the seizures invariably returned.

Epileptic seizures are brought on by abnormal electrical activity in the brain. The causes can vary, from a defective gene to a head injury, but one common mechanism of the condition is chronic inflammation throughout the whole body. Geyelin wondered what precisely happens during fasting that might be acting to counter this.

He found changes in two particular molecules in the blood: falling blood glucose and raised levels of fat metabolites, called ketones. So how to achieve this without starving the patient? Over the following decade the ketogenic diet was developed: a strict programme enforcing a 4:1 ratio of fats to proteins and carbohydrates.

Nuts, cream, butter and foods high in fat are encouraged while bread, pasta, sugar and grains are all forbidden. This results in ketones replacing glucose as an alternative fuel – and this transition from glucose to fat metabolism reduces the systemic inflammation that can underlie epilepsy and many other diseases. In addition, it induces a process of healthy weight loss. This differs from losses that occur as a result of insufficient nutrition.

Early studies showed enormous success in the treatment of epilepsy – but then in 1938, phenytoin, an anticonvulsant drug, was discovered. It became the epilepsy medication of choice and the ketogenic diet was dismissed and largely forgotten.

In 1994, Hollywood film director Jim Abrahams came across a recent paper on the diet by a doctor at Johns Hopkins hospital in Baltimore. Abrahams’ two-year-old son Charlie was in a critical condition, experiencing up to a hundred epileptic seizures a day and not responding to either drugs or brain surgery.

“We were desperate, so I did some research to find out the options,” Abrahams says. “We found out about the ketogenic diet, and about a herbalist in Texas. I asked Charlie’s doctor what we should try. He said, ‘Flip a coin. I don’t believe either is going to work.’”

But after a month on the diet, Charlie was both drug- and seizure-free and has only the faintest memories of his traumatic start to life. “It was like a miracle,” Abrahams says. “But back in the 1990s, there were several myths used to talk people out of the diet. It was suggested that it stunts growth or may have long-term side-effects. Another popular argument is that it’s too difficult. The diet isn’t easy – but what’s more difficult, controlling what your kid eats or watching them have lots of seizures?”

Anticonvulsant drugs work in 70% of epileptics but if one drug fails, there is only a 10-15% chance that another will work. In addition, the side effects of long-term usage range from problems in bone density and hair growth to cognitive impairment. In a bid to bring the dietary option to the attention of similar families, Abrahams made the 1997 film First Do No Harm, starring Meryl Streep, based loosely on the experiences of his family.

It caused a new explosion of interest. Understanding exactly how the combination of low blood glucose and high ketones prevents seizures has become the subject of intense research. The diet is also viewed by some as a potential way of slowing down the growth of tumours and significantly delaying the onset of Alzheimer’s disease.

“It enhances the metabolic efficiency of all your normal cells,” Seyfried says. “With cancer cells, they can only produce the energy they need to grow via fermentation, which requires glucose. If you’re limiting glucose, you’re taking away their fuel. We know of many people who have had their tumours stop growing or become very indolent as a result of this diet, making these cells vulnerable to other kinds of non-toxic drugs and treatment.”

Aside from the risks from insufficient monitoring, the main difficulty the ketogenic diet poses has always been one of self-control. Therefore, the ultimate aim is a drug that can replicate its effects while allowing a normal diet. However, this remains a long way off.

But Abrahams believes that the problem is not so much human willpower as finance. “Ultimately hospitals are businesses, especially in the US,” he says. “The diet requires a trained dietitian, it is work-intensive, involves lots of hours and there is no pot of gold at the end of that, apart from the benefit to the family.”