A gene defect that can triple the risk of a child developing an allergy to peanuts has been identified, scientists have said.
An international research team led by Dundee University said it had made a "significant breakthrough" in understanding the disease.
The gene responsible - Filaggrin - has already been shown to be a factor in causing eczema and asthma.
Peanut allergy affects 1-2% of children in the UK and can be life-threatening.
The number of people affected by the condition has increased dramatically over the past 20 to 30 years, the Dundee team said - but the causes of the allergy are unknown.
Dr Sara Brown, a fellow at Dundee University, said investigating whether Filaggrin was a cause of peanut allergy was the "logical next step" after a link with eczema and asthma had been established.
"Allergic conditions often run in families, which tells us that inherited genetic factors are important," she said.
"In addition to that, changes in the environment and our exposure to peanuts are thought to have been responsible for the recent increase in peanut allergy seen in the Western world in particular.
"Now, for the first time, we have a genetic change that can be firmly linked to peanut allergy."
The findings - by scientists from Canada, the UK, Ireland and the Netherlands - have been published in the Journal of Allergy and Clinical Immunology.
Their research discovered that the Filaggrin gene helped to make the skin a good barrier against irritants and allergens.
But changes in the gene decreased the effectiveness of this barrier, allowing substances to enter the body and leading to a range of allergic conditions.
The study suggests one in five of all peanut allergy sufferers have a Filaggrin defect. Those with the defect can be three times more likely to suffer peanut allergy than people with normal Filaggrin.
Professor Irwin McLean, one of the world's leading authorities on the gene, said: "We knew that people with a Filaggrin defect were likely to suffer from eczema, and that many of those people also had peanut allergy.
"What we have now shown is that the Filaggrin defect is there for people who have peanut allergy but who don't have eczema, which shows a clear link between Filaggrin and peanut allergy."
Professor McLean, who is also based at Dundee University, said the Filaggrin defect was not the only cause of peanut allergy - but had been established as a factor in many cases.
He added that as Filaggrin defects were found in only 20% of the peanut allergy cases, there was still a lot of work to be done to understand fully the genetic link to the allergy.