Soldiers and emergency workers could soon be given a jab of friendly bacteria to protect against post-traumatic stress disorder (PTSD), a study found.

The probiotic-based immunisation could also be used to treat anxiety and depression.

Injections of beneficial bacteria can have long-lasting anti-inflammatory effects on the brain making it more resilient to the physical and behavioural effects of stress.

The bacteria Mycobacterium vaccae was first isolated from the mud on the shores of Lake Kyoga in Uganda.

Senior research associate Matthew Frank in the Department of Psychology and Neuroscience at the University of Colorado Boulder said if the findings are replicated in clinical trials it could lead to an anti-stress jab.

He said: "We found that in rodents this particular bacterium, Mycobacterium vaccae, actually shifts the environment in the brain toward an anti-inflammatory state.

"If you could do that in people, it could have broad implications for a number of neuro-inflammatory diseases."

Anxiety, PTSD and other stress-related mental disorders affect a quarter of all people at some point in their lives.

PTSD is estimated to affect about one in every three Britons who have a traumatic experience, but it's not clear exactly why some people develop the condition and others do not.

Mounting research suggested stress-induced brain inflammation can boost risk of such disorders, in part by impacting mood-influencing neurotransmitters like norepinephrine or dopamine.

Dr Frank said: "There is a robust literature that shows if you induce an inflammatory immune response in people, they quickly show signs of depression and anxiety.

"Just think about how you feel when you get the flu."

Other studies have suggested trauma, illness or surgery can sensitise certain regions of the brain, setting up a hair-trigger inflammatory response which can lead to mood disorders and cognitive decline.

Dr Frank said: "We found that Mycobacterium vaccae blocked those sensitising effects of stress too, creating a lasting stress-resilient phenotype in the brain."