Patients with cluster headaches have been reported to have low serum ionized magnesium levels. We examined the possibility that patients with cluster headaches and low ionized magnesium levels may respond to an intravenous infusion of magnesium sulfate. Thirty-eight infusions of magnesium sulfate were given to 22 patients with cluster headaches. The mean ionized magnesium level prior to 23 infusions which provided relief for at least 2 days and enabled the patient to skip two or more attacks, was 0.521 +/- 0.016 mmol/L; this value was 0.561 +/- 0.016 prior to 15 infusions which were ineffective. These latter 15 infusions were preceded by higher total magnesium levels. The ionized magnesium level prior to the 23 effective infusions was below 0.54 mmol/L in 19 patients. Five of the 15 ineffective infusions were accompanied by basal ionized magnesium levels below 0.54 mmol/L. In 76% of the infusions, there was a correlation between a response and an ionized magnesium level below 0.54 mmol/L. Nine patients (41%) obtained clinically meaningful improvement. Spontaneous remissions and a placebo effect might have accounted for some of the improvement. However, this should have applied equally to all patients, regardless of the ionized magnesium level. Measurements of ionized magnesium may prove useful in elucidating the pathogenesis of cluster headache and in identifying patients who may benefit from treatment with magnesium.