Behaviour can be affected by events in previous generations which have been passed on through a form of genetic memory, animal studies suggest.
Experiments showed that a traumatic event could affect the DNA in sperm and alter the brains and behaviour of subsequent generations.
A Nature Neuroscience study shows mice trained to avoid a smell passed their aversion on to their "grandchildren".
Experts said the results were important for phobia and anxiety research.
The animals were trained to fear a smell similar to cherry blossom.
The team at the Emory University School of Medicine, in the US, then looked at what was happening inside the sperm.
They showed a section of DNA responsible for sensitivity to the cherry blossom scent was made more active in the mice's sperm.
Both the mice's offspring, and their offspring, were "extremely sensitive" to cherry blossom and would avoid the scent, despite never having experiencing it in their lives.
Changes in brain structure were also found.
"The experiences of a parent, even before conceiving, markedly influence both structure and function in the nervous system of subsequent generations," the report concluded.