There is some truth to the longstanding anecdote that your locks can lose color when you’re stressed.

A team of researchers has found that in mice, stressful events damage the stem cells that are responsible for producing pigment in hair. These stem cells, found near the base of each hair follicle, differentiate to form more specialized cells called melanocytes, which generate the brown, black, red and yellow hues in hair and skin. Stress makes the stem cells differentiate faster, exhausting their number and resulting in strands that are more likely to be transparent — gray.

The study, published Wednesday in Nature, also found that the sympathetic nervous system, which prepares the body to respond to threats, plays an important role in the graying process.

“Normally, the sympathetic nervous system is an emergency system for fight or flight, and it is supposed to be very beneficial or, at the very least, its effects are supposed to be transient and reversible,” said Ya-Chieh Hsu, a stem cell biologist at Harvard University who led the study.