The discovery may help create new treatments for atopic eczema, the condition causes distressing itchy lesions that can lead to broken skin with increased susceptibility to infection.
It can have a severe impact on people's lives, work and sleep, researchers said.
The discovery follows recent studies that show having an intact natural skin barrier is important in preventing eczema.
Now, researchers at the University of Edinburgh in the UK have found a way to use the body's own defence system to repair tiny breaks in the skin's natural barrier, which make people more vulnerable to eczema.
More From This Section
The skin's barrier can be impaired by genetic flaws, environmental factors or bacterial infections.
People with eczema are much more likely to carry bacteria known as Staphylococcus aureus on their skins.
In people with eczema, this bacteria can infect skin lesions and cause damage to the skin barrier.
Researchers at Edinburgh's MRC Centre for Inflammation Research have discovered that skin cells can be instructed to produce a naturally occurring protective compound.
Individuals with eczema typically do not turn on production of hBD2 in their damaged skin lesions.
The researchers found that when hBD2 was applied to skin cells grown in the lab, it helped the skin to remain intact, with the cells strengthening protection against the bacterial damage like reinforcing mortar between the bricks in a wall.
Their findings could lead to new therapies to prevent or treat eczema. Conventional treatment with steroid creams can have side-effects, and become less effective over time.
The study was published in the Journal of Investigative Dermatology.