Why some people are troubled by cold sores while others are not has finally been explained by scientists.

Cold sores affect around one in five people but, until now, no one has been sure why some are more prone to the virus that causes them.

Researchers at the University of Edinburgh have found that people affected by cold sores have a mutation in a gene, which means their immune system is not able to prevent them from developing.

Cold sores are caused by a strain of the herpes simplex virus - herpes simplex virus type 1 (HSV-1). Between 80 and 90 per cent of people are infected with the virus, but only about a quarter of them get frequent cold sores.

Scientists analysed thousands of genes to identify which ones expressed the proteins needed by the body's immune system to prevent the virus from becoming active and - as a result - cold sores from developing.

They then looked at blood samples from people with cold sores and found that one of the genes previously identified - IL28b - was mutated.

This genetic mutation means that the body is not able to mount an adequate immune response to the virus, which results in cold sores.

The gene identified is also linked to treatment responses for hepatitis C patients. If this gene is mutated, patients are less likely to respond as well to treatment. The link is further evidence that a single genetic mutation can be linked to different viruses.

The study, published in the journal Plos Pathogens, was funded by the Medical Research Council, the Biotechnology and Biological Sciences Research Council, the Wellcome Trust and the European Union.

Professor Juergen Haas, of the University of Edinburgh's Division of Pathway Medicine, said: "Most people carry the cold sore strain of the herpes simplex virus, but until now we never knew why only some of them develop cold sores.

"Knowing that susceptibility to the virus involved relates to people's genes reinforces the need to research, not only the evolution of viruses themselves, but also the susceptibility of hosts to infection."