People who have a family history of seizure disorders such as epilepsy are at greater risk of having migraines.
Research published in Epilepsia, a journal of the International League Against Epilepsy, has confirmed the link between the two conditions.
Epilepsy and migraines often occur together in patients and people with seizure disorders are much more likely to get migraines, but it is unclear why this is the case.
Lead author Melodie Winawer, from Columbia University Medical Centre in New York, explained that epilepsy and migraine are both influenced by genetic factors, but that this study is the first to show a "shared genetic susceptibility" to epilepsy and migraine.
The researchers looked at data collected from a large-scale genetic study of epilepsy patients and families from 27 clinical centres across the globe.
While most people with epilepsy have no family history of the disease, this study looked at the families where more than one member suffered from seizure disorders in order to find genetic causes of epilepsy.
Researchers used this to examine the family history of migraines in those who have epilepsy.
Findings showed that the prevalence of migraine with aura (where the sufferer experiences additional symptoms such as blind spots or flashing lights before the headache) is significantly higher where there is a strong family history of epilepsy.
Study participants who had three or more close relatives with epilepsy were twice as likely to have migraine with aura than epilepsy sufferers with a weak family history.
Winawer said: "Our study demonstrates a strong genetic basis for migraine and epilepsy, because the rate of migraine is increased only in people who have close - rather than distant - relatives with epilepsy and only when three or more family members are affected."
The authors hope that the study has implications for improving the quality of life for epilepsy sufferers. "Further investigation of the genetics of groups of co-morbid disorders and epilepsy will help to improve the diagnosis and treatment of these comorbidities, and enhance the quality of life for those with epilepsy," she concluded.