Four days of agony, anguish and doctor's visits followed before the parents of one 11-year-old boy realised their mistake.
A lot of people say they cannot live without coffee, but for one 11-year-old boy living in France, that may be literally true.
When his parents accidently bought decaffeinated capsules recently, a rare genetic muscular disorder -- which they knew could be held in check by two shots of espresso per day -- flared up, provoking uncontrollable and painful muscle spasms.
Four days of agony, anguish and doctor's visits followed before his parents realised their mistake.
Once they boy started drinking the caffeinated brew again, the symptoms subsided.
"It's one of those amazing cases of serendipity that dot the history of medicine," said Emmanuel Flamand-Roze, a doctor at Pitie-Salpetriere Hospital in Paris and lead author of a study published Tuesday about the disease afflicting his patient.
Unwittingly, Flamand-Roze told AFP, the parents had carried out what scientists called a double-blind placebo experiment -- the most rigorous test possible to see if a drug or treatment actually works.
The "double blind" part means that neither the patient nor the persons carrying out the experiment know whether the medicine is the real thing of a inert fake.
In this case, the accidental test proved the efficacy of caffeine as a treatment of dyskinesia -- a family of disorders characterised by violent, involuntary muscle movements -- caused by a mutation in the ADCY5 gene.
One in a million
"The arms, legs and face all move wildly," Flamand-Roze explained.
"This child couldn't ride a bike, walk home from school, write with a pencil -- a seizure-like crisis could strike at any time."
ADCY5-related dyskinesia is a roughly one-in-a-million disease, and there is no known cure.
The gene in its normal state provides instructions for making an enzyme that helps to regulate muscle contraction.
The mutation disrupts that process, and caffeine helps to restore it.
Doctors had long known that strong coffee helps quell the muscle spasms, but the condition is so rare that there are not enough patients to conduct an experiment in which one group take the "medicine", and another imbibes a look-alike -- in this case, a taste-alike -- placebo.
Such an experiment would, in any case, probably raise ethical issues, since researchers would know ahead of time that the placebo group would likely suffer severe discomfort.
The condition is also known as facial myokymia, and is sometimes misdiagnosed as cerebral palsy.
The symptoms typically appear as sudden jerks, twitches and tremors, and writhing, and usually begin between infancy and late adolescence. The movements can occur during waking hours or at night.
The problem can also strike internally with the respiratory muscles.
The study was published in the US-based Annals of Internal Medicine.