EXERCISE is the closest thing medicine has to a panacea. Though hitting the treadmill is more effort than swallowing a pill, the benefits are worth it. Even modest amounts of exercise protect against diseases ranging from diabetes and osteoporosis to heart attacks and senility.

Exercise works its magic in many ways. It improves the power and efficiency of the heart; it boosts the release of certain neurotransmitters (the chemicals nerve cells use to talk to each other); and it stimulates cells' garbage-disposal machinery. Now a group of researchers led by Charlotte Ling of Lund University, in Sweden, has discovered another effect of exercise. It alters the way genes work in the tissue that stores fat.

In a paper published in the Public Library of Science, Dr Ling and her colleagues report the effects of six months of moderate exercise on 23 male couch-potatoes who were in their 30s and 40s. The men were supposed to attend three workouts a week. In the event, they managed an average of 1.8. Nevertheless, besides finding the usual effects--reduced heart rate, lowered blood pressure and a drop in cholesterol levels--the researchers also observed changes in the men's adipose tissue, the place where fat is stored. Specifically, the way fat cells in this tissue expressed their genes had altered.

This is epigenetics, a rapidly developing branch of biology that focuses not on the genes themselves but rather on how particular genes behave in specific cells. Which genes are active in a cell can be changed by making chemical alterations (known as epigenetic markers) to their DNA. Such alterations let the body fine-tune its response to the environment, and modern gene-sequencing techniques can detect them without too much difficulty.

Dr Ling, who is interested in adult-onset diabetes (often associated with too much body fat), knew that exercise stimulates epigenetic changes in muscle cells. These alter how muscle processes sugar. When she and her colleagues looked for similar alterations in their charges' adipose tissue, they found lots--18,000 markers distributed across 7,663 genes. This matters, because adipose tissue is not just a passive store of energy, it is also an organ in its own right, producing a range of biologically active chemicals that have all manner of effects on the rest of the body.

Genetic epicentre

What all these epigenetic markers are doing remains obscure. But among the altered genes were 18 known to be associated with obesity and another 21 linked with adult-onset diabetes. When Dr Ling's colleagues picked two such altered genes and silenced them completely in laboratory-grown fat cells, the cells changed, becoming more efficient at processing and depositing fat. That leads, Dr Ling notes, to the hypothesis that one reason exercise is good for you is because it improves the ability of fatty tissue to do its job. Lipids thus get stored in the right place instead of settling elsewhere in the body, where they do harm. As she observes, if you do have surplus fat it is better to have it stored in fatty tissue than in the liver or the pancreas.

This study is only a beginning. Working out which epigenetic changes wrought by exercise are important, and which incidental, will take time. But, given worries about how overweight people are becoming, and the incessant message from many governments that their citizens should take more exercise, studies like Dr Ling's should help by shining light on the way exercise actually works its magic.

Click here to subscribe to The Economist