Scientists have identified why stress during pregnancy can alter the growth an unborn child.
Stress speeds up growth at the start of a woman's term - but slows it down if it happens towards the end, say scientists.
It has been previously found adversity in pregnancy can enhance or hamper the development and performance of offspring.
But this new study by the University of New Mexico offers the clearest explanation to date as to why there appears to be a correlation between certain mental health issues and birth weight.
Lead author Dr Andreas Berghanel, an evolutionary anthropologist at the University of New Mexico, said: "The idea is pre-natal stress affects offspring in two different ways depending on the timing of the stressor during pregnancy - yielding different outcomes before birth, after birth and after weaning."
Dr Berghanel and colleagues have now come up with a theory that explains the highly variable patterns.
Their study compared the growth rates of disadvantaged offspring across 719 studies on 21 different species of mammals.
They showed that stress late in pregnancy causes mothers to invest less energy in their child - which leads to slower growth in the womb and during infancy.
But once the baby no longer needs nursing - or nutritional independence - they are no longer affected directly and consequently grow at the same rate as their peers.
So maternal stress towards the end of gestation leads to slow growth during dependent phases - but has no effect later.
In contrast stress early in pregnancy causes the fetus to be entirely reprogrammed to deal with a reduced life expectancy.
To "make the best of a bad job" it switches to an accelerated pace of life in its early stages, challenging womb environment.
It grows and matures faster than those whose mothers are relaxed at this time of pregnancy - to ensure it reproduces before it dies.
Once set on the fast track, the offspring under early prenatal maternal stress remain on this trajectory - even after weaning.
This means they "overshoot" the usual body size for age throughout development.
Dr Berghanel said: "These new results may bear some translational value for understanding why girls start their menstrual cycles earlier in poorer neighbourhoods."
In combination an infant's acceleration of their developmental processes together with a deceleration due to reduced maternal investment could then cancel each other out during phases of intense maternal investment - gestation and breastfeeding.
It's not until the infant is nutritionally independent the programming effects become clear.
Dr Berghanel said this new comparative research finds all of these predictions are supported in a large sample of studies.
Each measured the effects of pre-natal stress on offspring size and growth compared to an unchallenged control group.
Dr Berghanel said: "We found stress during late gestation reduces offspring growth during dependence - resulting in a reduced body size throughout development - whereas stress during early gestation results in largely unaffected growth rates during dependence but accelerated growth and increased size after weaning."
All stressors seem to have the same effect - and the results are stable across a variety of experiments, said the researchers.
Mothers were exposed directly to stressors via food restriction or other adversities.
Experiments were also used to increase "stress hormones" such as cortisol.
But the patterns of offspring growth across developmental stage relative to the timing of the stressor remained the same.
Dr Berghanel said the results could shed light on girls starting their menstrual cycles earlier in poorer neighborhoods and teenage pregnancies being more frequent in disadvantaged families.
They may also explain adverse conditions during early development - particularly in formula-fed children - often leading to obesity and other metabolic health problems later in life.
Maternal stress during gestation causes numerous effects on infant physiology that extend well into adulthood.
Tests of this hypothesis across mammals suggest the timing of the stressor during gestation is crucial for a full comprehension of pre-natal stress effects on offspring growth.
Dr Berghanel said the results support an adaptive life history perspective on maternal effects that is relevant for evolutionary biology, medicine and psychology.
The study was published in the journal Proceedings of the National Academy of Sciences.
Stress is hereditary: Kids of stressed mothes "are less resilient"
Children may be less resilient to stress if their mothers suffered stress in their second trimester of pregnancy, new research suggests.
The small study by the University of California at San Francisco found babies of mothers with the highest number of stressful life events were more reactive to stressors, and took longer to recover.
This stress appeared to impact their heart, and put them at a higher risk of depression and behavioral issues in later life than their peers.
It comes just weeks after another study suggested male stress could affect the resilience of their offspring, building on a growing swell of research connecting generational stress levels.