Ouch! Sometimes medical discoveries can be a real headache. A recent Danish study succeeded in sparking intense migraines in 86 percent of its test subjects, a finding scientists say could be key to ending the chronic and painful condition, The Washington Post reports.

Migraines affect more than 10 percent of people worldwide. Besides the pounding pain they produce, these excruciating headaches can cause nausea and temporary vision problems and even require hospitalization. So far, no one has been able to figure out exactly what causes them—but this research may change that.

For the study, researchers recruited 14 people who suffer from chronic migraines and tested their headache triggers. Turns out, one naturally occurring substance used in the study, called cyclic AMP, or cAMP—used by the body to dilate blood vessels—sparked migraines in 12 of the subjects.

Scientists said that because of the small sample size, more research is required to prove that cAMP is indeed a migraine trigger. Still, this study could be one of the first real answers to the causes and possible cures for the condition.

Until then, migraine sufferers will have to pop pain pills and applaud the brave souls who endured this study for the benefit of science.

For more information about migraines and chronic headaches, click here.