Ask a keen gardener why they spend hours on their knees in the dirt, and many will tell you it calms them in a way little else does. Some of that is the fresh air, the quiet and the sense of making something grow. But there may be something else going on. Soil is full of bacteria our immune systems evolved alongside, and some of them appear to calm inflammation, which in turn affects how the brain handles stress. Modern life has cut most of us off from them.
From “too clean” to “missing old friends”
In 1989, a British researcher noticed that children from larger families had less hay fever and eczema. He suggested that catching more infections from older brothers and sisters in early childhood might protect against allergies.¹ This became known as the hygiene hypothesis.
The idea has since been refined. The organisms that seem to matter most aren’t the infections that make us sick. They’re the microbes our ancestors lived with constantly: the bacteria in soil, untreated water, animals and the people around them. Our immune systems evolved expecting these “old friends”, and they help train the immune system to stay calm rather than overreact. City life, indoor living and processed food have cut us off from many of them.²
One of the clearest real-world examples comes from two farming communities in the United States. The Amish and the Hutterites share very similar genetic ancestry and lifestyles, but the Amish farm traditionally, with animals close to the house, while the Hutterites use industrial farming. Amish children had about a quarter the asthma rate, their house dust carried far more microbial material, and their immune cells behaved differently. When the Amish house dust was given to mice, it protected them from allergic asthma. The Hutterite dust didn’t.³
How inflammation affects your mood
You’ve probably noticed how flat, anxious and foggy you feel when you’re coming down with something. That isn’t only tiredness. Inflammation acts directly on the brain.
When healthy volunteers were given a tiny dose of bacterial endotoxin, enough to switch on their immune system without making them feel physically ill, they became noticeably more anxious and low in mood, and their memory dipped. The more inflammatory messengers their immune system released, the stronger these effects were.⁴ I’ve written about how endotoxins from gut bacteria drive this kind of inflammation in bacteria and endotoxins, and about why being unwell makes people withdraw in why being sick makes you want to be alone.
The bacteria in your gut are part of this picture too. People with depression tend to have lower levels of particular gut bacteria, and some gut bacteria can make or break down compounds that act on the brain.⁵ So the microbes you live with can tilt the immune system, and through it, how your brain responds to stress.
The soil bacterium that made stressed mice more resilient
One soil bacterium, Mycobacterium vaccae, has been studied more than most. Its story started with people. When a heat-killed preparation of it was added to chemotherapy for advanced lung cancer, it didn’t help people live longer. But patients receiving it kept a noticeably better quality of life than those who didn’t, which caught researchers’ attention.⁶
Researchers then tested it in mice. Mice were given injections of the heat-killed bacterium and later exposed to a stressful situation, housed with a larger, aggressive mouse. Compared with untreated mice, they were less fearful and less anxious, and they didn’t develop the stress-induced bowel inflammation the others did. When the researchers removed the regulatory immune cells that keep inflammation in check, the protection disappeared.⁷ That points to the immune system as the link between the bacterium and the brain.
The same group later found a fat in the bacterium’s cell wall, called 10(Z)-hexadecenoic acid, that calms inflammation. It switches on a receptor called PPAR-alpha in immune cells and dampens their inflammatory response.⁸ This is likely one of the active ingredients, though probably not the only one.
It’s important to be clear about what this does and doesn’t show. These protective effects come from injected, heat-killed bacteria in mice. Nobody has shown that touching soil or gardening delivers enough M. vaccae to have the same effect in people. It’s a promising lead, not a proven treatment.
What happens when children play in more diverse surroundings
There’s encouraging human evidence for the bigger idea. In Finland, the gravel yards of several city daycare centres were replaced with forest floor, lawn and planting boxes for the children to play and garden in. Within a month, the children’s skin bacteria had become more diverse, and their blood showed more of the immune cells and messengers that keep inflammation in check.⁹
Gardening itself also seems good for mental health. People who garden tend to report less depression and anxiety, more life satisfaction and a better quality of life.¹⁰ That can’t be pinned on soil bacteria alone, since gardening also brings sunlight, movement, purpose and time outdoors. But they all point in the same direction.
Why this matters if you’re stressed or inflamed
Many conditions that flare with stress also have an inflammatory side: irritable bowel syndrome, inflammatory bowel disease, anxiety and low mood among them. If modern life has left your immune system with fewer of the microbes that teach it to stay calm, it may be quicker to react, and slower to settle once it does. Reconnecting with soil and the outdoors is one small, low-cost way to work on that, alongside looking after your gut.
How to get more contact with soil, safely
- Garden. Vegetables, herbs, flowers or a few pots all count.
- Let children play outside in dirt, grass and sand, and don’t worry about every bit of mud.
- Spend time in green spaces, parks, bush and forest.
- Walk barefoot on grass or sand where it’s safe to do so.
- Grow some of your own food, or buy from local growers.
A few safety points matter, especially in Australia:
- Take care with bagged potting mix and compost. In Australia and New Zealand they can carry a bacterium, Legionella longbeachae, that causes a serious lung infection.¹¹ Open bags away from your face, dampen the mix to keep dust down, wear gloves and a mask when handling it, and wash your hands afterwards. Ordinary garden soil is a different matter.
- Wash your hands before eating after gardening.
- Wash vegetables before eating them. Soil can carry bacteria and parasites that cause food poisoning, so the benefit comes from contact with soil, not from eating it.
- Keep your tetanus vaccination up to date if you garden, and clean any cuts promptly.
Frequently asked questions
What is the hygiene hypothesis?
The hygiene hypothesis is the idea that too little microbial exposure in early life leaves the immune system more prone to allergies and inflammation. It has been refined into the “old friends” idea: what matters most is contact with the harmless microbes from soil, animals and nature that our immune systems evolved alongside.
What is Mycobacterium vaccae?
Mycobacterium vaccae is a harmless bacterium found in soil. In mice, injections of heat-killed M. vaccae reduced stress-related anxiety and bowel inflammation, and it contains a fat that calms inflammatory immune cells. These effects haven’t been shown in people through ordinary soil contact.
Can inflammation cause anxiety and depression?
Inflammation can affect mood directly. When healthy people were given a small dose of bacterial endotoxin, they became more anxious and low in mood and their memory dipped, in proportion to how much their immune system responded.
Is gardening good for mental health?
Gardening is consistently linked with less depression and anxiety and better quality of life. Some of the benefit likely comes from soil microbes, but sunlight, movement, purpose and time outdoors all contribute too.
Is potting mix dangerous?
Bagged potting mix and compost in Australia and New Zealand can carry Legionella longbeachae, which causes a serious lung infection. Open bags carefully, keep the mix damp, wear gloves and a mask, and wash your hands afterwards.
Should I leave soil on my vegetables?
No. Soil can carry bacteria and parasites that cause food poisoning. Get your soil contact through gardening and time outdoors, and wash vegetables before eating them.
References
1. Strachan DP. Hay fever, hygiene, and household size. BMJ. 1989;299(6710):1259-1260. PMID 2513902.
2. Rook GAW. 99th Dahlem conference on infection, inflammation and chronic inflammatory disorders: Darwinian medicine and the ‘hygiene’ or ‘old friends’ hypothesis. Clin Exp Immunol. 2010;160(1):70-79. PMID 20415854.
3. Stein MM, Hrusch CL, Gozdz J, et al. Innate immunity and asthma risk in Amish and Hutterite farm children. N Engl J Med. 2016;375(5):411-421. PMID 27518660.
4. Reichenberg A, Yirmiya R, Schuld A, et al. Cytokine-associated emotional and cognitive disturbances in humans. Arch Gen Psychiatry. 2001;58(5):445-452. PMID 11343523.
5. Valles-Colomer M, Falony G, Darzi Y, et al. The neuroactive potential of the human gut microbiota in quality of life and depression. Nat Microbiol. 2019;4(4):623-632. PMID 30718848.
6. O’Brien MER, Anderson H, Kaukel E, et al. SRL172 (killed Mycobacterium vaccae) in addition to standard chemotherapy improves quality of life without affecting survival, in patients with advanced non-small-cell lung cancer: phase III results. Ann Oncol. 2004;15(6):906-914. PMID 15151947.
7. Reber SO, Siebler PH, Donner NC, et al. Immunization with a heat-killed preparation of the environmental bacterium Mycobacterium vaccae promotes stress resilience in mice. Proc Natl Acad Sci U S A. 2016;113(22):E3130-E3139. PMID 27185913.
8. Smith DG, Martinelli R, Besra GS, et al. Identification and characterization of a novel anti-inflammatory lipid isolated from Mycobacterium vaccae, a soil-derived bacterium with immunoregulatory and stress resilience properties. Psychopharmacology (Berl). 2019;236(5):1653-1670. PMID 31119329.
9. Roslund MI, Puhakka R, Grönroos M, et al. Biodiversity intervention enhances immune regulation and health-associated commensal microbiota among daycare children. Sci Adv. 2020;6(42):eaba2578. PMID 33055153.
10. Soga M, Gaston KJ, Yamaura Y. Gardening is beneficial for health: a meta-analysis. Prev Med Rep. 2017;5:92-99. PMID 27981022.
11. Whiley H, Bentham R. Legionella longbeachae and legionellosis. Emerg Infect Dis. 2011;17(4):579-583. PMID 21470444.



